bunkerweb/linux/scripts/postinstall.sh
2022-06-03 17:24:14 +02:00

16 lines
488 B
Bash

#!/bin/bash
# Stop nginx if it's running and remove the old config file if it exists
systemctl stop nginx
# Change the ownership of /opt/bunkerweb to nginx
chown -R nginx:nginx /opt/bunkerweb
# Change the ownership of bunkerweb.service to nginx
chown nginx:nginx /etc/systemd/system/bunkerweb.service
# Start bunkerweb service as nginx user and enable it to start on boot
systemctl enable bunkerweb
systemctl start bunkerweb
systemctl enable bunkerweb-ui
systemctl start bunkerweb-ui