Browse Source

Update pid info

master
Chris Wiegman 9 months ago
parent
commit
65a5e69003
Signed by: chriswiegman <chris@chriswiegman.com> GPG Key ID: 2B23D7A74FDE2DF4
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      ttrss.conf

+ 5
- 4
ttrss.conf View File

@@ -17,7 +17,7 @@ NAME=ttrss
DISABLED=0
FORKING=1

PIDFILE=/tmp/ttrss/update_daemon.lock
PIDFILE=/var/www/lock/update_daemon.lock
LOGFILE="/var/log/ttrss.log"

# Read configuration variable file if it is present
@@ -33,7 +33,7 @@ fi

LOADER=/usr/bin/php
DAEMON_DIR="/var/www"
SCRIPTNAME=/etc/init.d/tt-rss
SCRIPTNAME=/etc/init.d/ttrss

# Exit if the package or loader is not installed
[ -x "$LOADER" ] || exit 0
@@ -56,6 +56,7 @@ fi
#
do_start()
{

if [ ! -f "$LOGFILE" ] ; then
touch "$LOGFILE"
chown www-data:www-data "$LOGFILE"
@@ -65,10 +66,10 @@ do_start()
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --background --quiet -c "www-data:www-data" --chdir "$DAEMON_DIR" --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null \
start-stop-daemon --start --background -c "www-data:www-data" --chdir "$DAEMON_DIR" --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null \
|| return 1

start-stop-daemon --start --background --quiet -c "www-data:www-data" --chdir "$DAEMON_DIR" --pidfile "$PIDFILE" --exec "$DAEMON" --startas /bin/sh -- -c "$DAEMON $DAEMON_ARGS >> $LOGFILE 2>&1" \
start-stop-daemon --start --background -c "www-data:www-data" --chdir "$DAEMON_DIR" --pidfile "$PIDFILE" --exec "$DAEMON" --startas /bin/sh -- -c "$DAEMON $DAEMON_ARGS >> $LOGFILE 2>&1" \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend