Added some fixes for the Linux installer/service - now shipping a log4rs config; creates /var/log for log files; fixed name of service file
This commit is contained in:
@ -4,7 +4,7 @@ Description=Zealot video transcoder service
|
||||
[Service]
|
||||
User=zealot
|
||||
Group=zealot
|
||||
ExecStart=/usr/bin/zealot
|
||||
ExecStart=/usr/bin/zealot -l /etc/zealot/log4rs.yaml
|
||||
SuccessExitStatus=143
|
||||
|
||||
[Install]
|
12
build/etc/log4rs.yaml
Normal file
12
build/etc/log4rs.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
appenders:
|
||||
stdout:
|
||||
kind: console
|
||||
encoder:
|
||||
pattern: "{d(%+)(utc)} {h({l})}: {m}{n}"
|
||||
filters:
|
||||
- kind: threshold
|
||||
level: info
|
||||
root:
|
||||
level: info
|
||||
appenders:
|
||||
- stdout
|
@ -5,6 +5,7 @@ GETENT_GROUP=$(getent group zealot)
|
||||
|
||||
# Create the zealot user if it doesn't already exist
|
||||
if [ "$GETENT_USER" = "" ]; then
|
||||
echo "Creating the 'zealot' user."
|
||||
useradd -r zealot
|
||||
else
|
||||
echo "The 'zealot' user already exists, skipping creation."
|
||||
@ -12,6 +13,7 @@ fi
|
||||
|
||||
# Create the zealot group if it doesn't already exist
|
||||
if [ "$GETENT_GROUP" = "" ]; then
|
||||
echo "Creating the 'zealot' group."
|
||||
groupadd zealot
|
||||
usermod -aG zealot zealot
|
||||
else
|
||||
@ -21,6 +23,15 @@ fi
|
||||
# Change the directory ownership of /etc
|
||||
chown -R zealot:zealot /etc/zealot
|
||||
|
||||
# Create the log directory under /var/log
|
||||
if [ ! -d /var/log/zealot ]; then
|
||||
echo "Creating /var/log/zealot to store log files."
|
||||
mkdir /var/log/zealot
|
||||
chown zealot:zealot /var/log/zealot
|
||||
else
|
||||
echo "/var/log/zealot already exists, skipping creation."
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user