PhyrePanel-mirror/compilators/debian/web-terminal/postinst
2024-04-22 14:15:52 +03:00

31 lines
737 B
Bash

#!/bin/bash
set -e
if [ "$1" != "configure" ]; then
exit 0
fi
# Run triggers below only on updates
if [ ! -e "/usr/local/phyre/data/users/admin" ]; then
exit
fi
###############################################################
# Initialize functions/variables #
###############################################################
if [ -z "$PHYRE" ]; then
export PHYRE='/usr/local/phyre'
PATH=$PATH:/usr/local/phyre/bin
export PATH
fi
# Restart hestia-web-terminal service if enabled
if [ -f "/etc/systemd/system/phyre-web-terminal.service" ]; then
systemctl daemon-reload > /dev/null 2>&1
if systemctl is-enabled phyre-web-terminal > /dev/null 2>&1; then
systemctl restart phyre-web-terminal
fi
fi