Add default service config

This commit is contained in:
Gamerboy59 2024-09-08 21:51:55 +02:00 committed by GitHub
commit 1ef1e09b8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 198 additions and 19 deletions

View file

@ -2,8 +2,19 @@
set -e
# Create rpxy user if it doesn't exist
if ! id rpxy >/dev/null 2>&1; then
useradd --system --no-create-home --shell /usr/sbin/nologin rpxy
fi
# Set correct user for config directory
if [ -d /etc/rpxy ]; then
chown -R rpxy:rpxy /etc/rpxy
fi
# Reload systemd, enable and start the service
systemctl daemon-reload
systemctl enable rpxy
systemctl start rpxy
exit 0
exit 0