#!/usr/bin/perl system("userdel ppb; rm -rf /home/ppb") if (-d "/home/ppb"); system("userdel mike; rm -rf /home/mike") if (-d "/home/mike"); &ai('net-tools','zsh','joe','fuse','libwww-perl','bzip2','jq', 'libterm-readline-perl-perl','libterm-readpassword-perl','libdbd-mysql-perl','ntp'); system("chsh root -s /usr/bin/zsh"); system("mkdir /db"); system("mkdir /db/bin"); system("mkdir /db/backup"); system("mkdir /db/backup/mysql"); system("mkdir /db/tmp"); system("mkdir /db/log"); system("mkdir /db/lib"); system("mkdir /db/data"); system("mkdir /db/etc"); system("mkdir /db/src"); system("mkdir /db/upload"); system("chmod 777 /db/tmp"); system("chmod 777 /db/log"); system("chmod 777 /db/upload"); system("cp ./files/joerc4 /root/.joerc"); system("cp ./files/csh.cshrc /etc"); system("cp ./files/rc.local.ubuntu /etc/rc.local"); system("chmod 755 /etc/rc.local"); system("cp ./files/myuser /db/bin"); system("cp ./files/mybackup /db/bin"); system("cp ./files/dx /db/bin"); system("cp ./files/gx /db/bin"); system("cp ./files/gy /db/bin"); system("cp ./files/telemetry /db/bin"); system("cp ./files/rt /db/bin"); system("cp ./files/mgsh /db/bin"); system("cp ./files/zshrc /etc/zsh/zshrc"); system("mkdir /root/.ssh") if (!-d "/root/.ssh"); system("cp ./files/authorized_keys /root/.ssh"); system("chmod 700 /root/.ssh"); system("chmod 600 /root/.ssh/authorized_keys"); system("/usr/bin/apt update"); system("/usr/bin/apt upgrade"); system("service ntp stop"); system("/usr/sbin/ntpd -gq"); system("service ntp start"); sub ai { my @pkgs=@_; for (@pkgs) { system("/usr/bin/apt -qq -y install $_"); } }