Cleaning yunohost installation stage + install insserv
This commit is contained in:
parent
dbe4d2910e
commit
0204dc0793
1 changed files with 11 additions and 2 deletions
|
@ -1,15 +1,24 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
on_chroot << EOF
|
on_chroot << EOF
|
||||||
|
apt-get install insserv -y
|
||||||
cd /tmp/
|
cd /tmp/
|
||||||
wget -O install_yunohost https://install.yunohost.org/stretch
|
wget -O install_yunohost https://install.yunohost.org/stretch
|
||||||
chmod +x /tmp/install_yunohost
|
chmod +x /tmp/install_yunohost
|
||||||
./install_yunohost -a
|
./install_yunohost -a
|
||||||
rm -f /etc/ssh/ssh_host_*
|
rm -f /etc/ssh/ssh_host_*
|
||||||
apt-get clean
|
EOF
|
||||||
find /var/log -type f -exec rm {} \;
|
|
||||||
|
echo "Enabling ssh login for root + setting default password"
|
||||||
|
on_chroot << EOF
|
||||||
touch /boot/ssh
|
touch /boot/ssh
|
||||||
sed -i '/PermitRootLogin/c\PermitRootLogin yes' /etc/ssh/sshd_config
|
sed -i '/PermitRootLogin/c\PermitRootLogin yes' /etc/ssh/sshd_config
|
||||||
echo "root:yunohost" | chpasswd
|
echo "root:yunohost" | chpasswd
|
||||||
chage -d 0 root
|
chage -d 0 root
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
echo "Cleaning ..."
|
||||||
|
on_chroot << EOF
|
||||||
|
apt-get clean
|
||||||
|
find /var/log -type f -exec rm {} \;
|
||||||
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue