Bds-Maneger-CLI-Debian/DEBIAN/postinst
2021-01-01 22:47:53 -03:00

27 lines
890 B
Bash

#!/bin/bash
echo '--------------------------------------'
if [ -d /home/$SUDO_USER ];then
if ![ -e /home/$SUDO_USER/bds_maneger.json ];then
cp -fv /etc/bds-maneger/exemplo.json /home/$SUDO_USER/bds_maneger.json
else
echo 'We will not copy bds_maneger.json'
fi
fi
if [ -e /etc/init.d/bds ];then
echo "We are updating the services of Bds Manager for Debian"
cp -f /opt/bds-maneger/start-on-system.sh /etc/init.d/bds
systemctl daemon-reload
fi
# ---------------------------
if [ -e /home/$SUDO_USER/bds_maneger.json ];then
echo "Please modify the install.json, we may have modified something. the modifications are in the example.json"
fi
if command -v nginx &> /dev/null;then
echo "Restarting nginx Services"
service nginx restart
echo "Don't forget the ports are: IP/host:8080"
fi
echo '--------------------------------------'
exit 0