CyberHosting

Script installation of CyberPanel

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.

Comments

  • Hi,

    may I know how did you do the automatization ?
  • 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.
  • run

    sh <(curl cyberpanel.sh) help

    you will see what you need.
  • 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.
  • 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\n1\nn\ny\ny\ny\n'

    https://upcloud.com/community/tutorials/initialization-scripts/

    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
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!