Put the pid file in a place where it doesn't get deleted.
This commit is contained in:
parent
bf94c6724e
commit
a5f1d56434
|
@ -1,6 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
pidfile=${HOME}/SparkleShare/.tmp/sparkleshare.pid
|
if [ "$XDG_RUNTIME_DIR" ]; then
|
||||||
|
pidfile=${XDG_RUNTIME_DIR}/sparkleshare.pid
|
||||||
|
else
|
||||||
|
pidfile=/tmp/sparkleshare-${USER}.pid
|
||||||
|
fi
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
if [ -e "${pidfile}" ]; then
|
if [ -e "${pidfile}" ]; then
|
||||||
|
@ -15,9 +19,8 @@ start() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Starting SparkleShare... "
|
echo -n "Starting SparkleShare... "
|
||||||
mkdir -p /tmp/sparkleshare/
|
|
||||||
ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
|
ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
|
||||||
echo $! > ${pidfile}
|
( umask 066; echo $! > ${pidfile} )
|
||||||
echo "Done."
|
echo "Done."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue