L3xD
April 4, 2020, 5:22pm
1
I am trying to create a bash script to install CyberPanel on a UpCloud VM. The script works perfectly when started manually, as I’ve automated the input prompts as well. However when I run the script as part of the initialization of the VM it is killed halfway through.
However if the VM is up and I execute it manually all goes well. Is the CP installation to heavy for automatization or am I missing something in the VM configuration?
Thanks.
qtwrk
April 4, 2020, 5:56pm
2
Hi,
may I know how did you do the automatization ?
L3xD
April 5, 2020, 1:16pm
3
Type your comment> @qtwrk said:
Hi,
may I know how did you do the automatization ?
I’ve used printf command to set the prompts. It works with a little twinkering.
qtwrk
April 5, 2020, 1:17pm
4
run
sh <(curl cyberpanel.sh) help
you will see what you need.
L3xD
April 5, 2020, 3:47pm
5
Type your comment> @qtwrk said:
run
sh <(curl cyberpanel.sh) help
you will see what you need.
We’ve figured it out with using nohup argument. Now it runs on the background.
jomsky
April 27, 2020, 1:22am
6
L3xD can you share your script? I’m also using upcloudVM and I want to automate the installation once I’ve deployed a server
You can do stuff like this
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh ) <<< $'1
1
n
y
y
y
’
If you got kvm template support you can also edit your images to preload them
/etc/cyberpanel/cust-deploy.sh
virt-sysprep --operations bash-history,flag-reconfiguration,logfiles,lvm-uuids,machine-id,mail-spool,net-hwaddr,pacct-log,package-manager-cache,pam-data,rpm-db,ssh-hostkeys,tmp-files,udev-persistent-net,utmp,yum-uuid --firstboot-command ‘/bin/sh /etc/cyberpanel/cust-deploy.sh’ -a Cyberpanel-CentOS-7-x86_64.qcow2
Or if you have cloud-init style provider or support with proxmox
https://cloudinit.readthedocs.io/en/latest/topics/examples.html