#!/bin/bash # HelloHost Control Panel upgrade script for target version 1.3.3 ####################################################################################### ####### Place additional commands below. ####### ####################################################################################### # Check if keys folder exists and adjust permissions if [ -d "$HELLOHOST/data/keys" ]; then echo '[ * ] Update permissions' chmod 750 "$HELLOHOST/data/keys" chown admin:root "$HELLOHOST/data/keys" fi if [[ ! -e /etc/hellohostcp/hellohost.conf ]]; then echo '[ * ] Create global HelloHost config' mkdir -p /etc/hellohostcp echo -e "# Do not edit this file, will get overwritten on next upgrade, use /etc/hellohostcp/local.conf instead\n\nexport HELLOHOST='/usr/local/hellohost'\n\n[[ -f /etc/hellohostcp/local.conf ]] && source /etc/hellohostcp/local.conf" > /etc/hellohostcp/hellohost.conf fi