Merge pull request #24 from kfeoktistoff/debian_mkdir_log_on_startup

debian: create a log dir on startup if absent
This commit is contained in:
idk
2021-11-20 21:53:06 +00:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

1
debian/i2p.init vendored
View File

@@ -96,6 +96,7 @@ do_start()
|| return 1
[ -d $RUN ] || mkdir $RUN > /dev/null 2>&1
[ -d $I2PTEMP ] || mkdir $I2PTEMP > /dev/null 2>&1
[ -d "/var/log/$NAME" ] || mkdir "/var/log/$NAME" > /dev/null 2>&1
if [ -r $PIDFILE ]; then
PID="$(cat ${PIDFILE})"
if ! kill -0 $PID > /dev/null 2>&1; then

1
debian/i2p.service vendored
View File

@@ -39,6 +39,7 @@ User=i2psvc
PermissionsStartOnly=true
AppArmorProfile=system_i2p
ExecStartPre=/bin/mkdir -p /tmp/i2p-daemon
ExecStartPre=/bin/mkdir -p /var/log/i2p
ExecStartPre=/bin/chown -R ${I2PUSER}:${I2PUSER} /var/log/i2p /run/i2p /tmp/i2p-daemon
ExecStartPre=/bin/chmod 750 /var/log/i2p
ExecStart=/usr/sbin/wrapper "$I2P_ARGS"