systemd unit, debian patch fix, makefile last-dist added, package log&pid folder edited

This commit is contained in:
atnaguzin 2016-11-03 19:08:21 +03:00
parent 4b983300fe
commit 8b0ce30dfc
14 changed files with 69 additions and 19 deletions

8
debian/i2pd.init vendored
View file

@ -15,10 +15,10 @@ DESC=i2pd # Introduce a short description here
NAME=i2pd # Introduce the short server's name here
DAEMON=/usr/sbin/$NAME # Introduce the server's location here
DAEMON_OPTS="" # Arguments to run the daemon with
PIDFILE=/var/run/$NAME.pid
PIDFILE=/var/run/$NAME/$NAME.pid
I2PCONF=/etc/$NAME/i2pd.conf
TUNCONF=/etc/$NAME/tunnels.conf
LOGFILE=/var/log/$NAME.log
LOGFILE=/var/log/$NAME/$NAME.log
USER="i2pd"
# Exit if the package is not installed
@ -41,9 +41,11 @@ do_start()
return 2
fi
test -e /var/run/i2pd || install -m 755 -o i2pd -g i2pd -d /var/run/i2pd
touch "$PIDFILE"
chown -f $USER:adm "$PIDFILE"
test -e /var/log/i2pd || install -m 755 -o i2pd -g i2pd -d /var/log/i2pd
touch "$LOGFILE"
chown -f $USER:adm "$LOGFILE"
@ -99,7 +101,7 @@ case "$1" in
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
reload)
reload|force-reload)
log_daemon_msg "Reloading $DESC" "$NAME"
do_reload
log_end_msg $?