Test new post-install script for OVH template
This commit is contained in:
parent
f51aae7bc2
commit
15453a7972
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Update repositories
|
||||
apt update
|
||||
# Install few dependencies
|
||||
apt --assume-yes install -- wget
|
||||
|
||||
# Remove last partition with all free space
|
||||
umount /dev/sys/free
|
||||
lvremove --force /dev/sys/free
|
||||
/bin/rmdir --force -- /mnt/free
|
||||
/bin/sed --in-place -- '/lv_free/d' /etc/fstab
|
||||
|
||||
# Allow root connection with password
|
||||
/bin/sed --in-place -- 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config
|
||||
|
||||
# Download and uncompress latecommand archive
|
||||
wget --quiet --output-document=/tmp/latecommand.tar.gz -- "https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/branch/master/scripts/latecommand.tar.gz"
|
||||
tar xzf /tmp/latecommand.tar.gz -C /tmp/
|
||||
# Run dedicated script
|
||||
## Source /etc/os-release to get Debian codename
|
||||
. /etc/os-release
|
||||
/bin/sh /tmp/latecommand/post."${VERSION_CODENAME:=bookworm}".sh
|
Loading…
Reference in New Issue