I am attempting my first charm, and successfully gotten something that is starting to look okay…
I seem to perform su ubuntu
, change directories … but when I see the results it is still root
any ideas how to change users and install as ubuntu
user?
#!/bin/bash
apt install libxrender1 libxtst6 libxi6 -y
juju-log -l 'INFO' 'XServer Dependencies installed'
su ubuntu
ch /home/ubuntu
curl https://download2.interactivebrokers.com/installers/ibgateway/latest-standalone/ibgateway-latest-standalone-linux-x64.sh --output ibgateway-latest-standalone-linux-x64.sh
chmod +x ibgateway-latest-standalone-linux-x64.sh
chown ubuntu.ubuntu ibgateway-latest-standalone-linux-x64.sh
# Install IB Gateway
yes n | ./ibgateway-latest-standalone-linux-x64.sh
exit
juju-log -l 'INFO' 'IBGateway Installed'
resulting charm