Hello there,
can anybody describe me how to add a user via SSH which has the ability to view the Teamdrive Server installation and stop / start tdpsd?
Cheers, Christian
#! /bin/sh
### BEGIN INIT INFO
# Provides: TeamDrive Personal Server
# Required-Start: networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: TeamDrive Personal Server Daemon
# Description: Starts/Stops/Restarts the TeamDrive Personal Server Daemon
### END INIT INFO
#
#
###############################################################################
# Version History / Change Log:
###############################################################################
#
# 2011-02-16 St. Fu. CREATE: Create new script to support
# TD service autorun under Ubuntu/Debian
# Tested with i386 and AMD64 Linux
# Script is under GPLv2
# 2013-07-30 St. Fu. UPDATE: Support for new Version
#
#
################################################################################
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="TeamDrive 1.1.058 Server Linux"
NAME=tdpsd
USER=setup
DIR=/home/setup/tdps
DAEMON=$DIR/tdpsd
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Export necessary for starting...
export LD_LIBRARY_PATH="$DIR:$LD_LIBRARY_PATH"
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
d_start() {
start-stop-daemon --start --quiet \
--background \
--chuid $USER \
--chdir $DIR \
--exec $DAEMON \
> /dev/null \
|| echo -n " already running"
}
d_stop() {
start-stop-daemon --stop --quiet \
--chuid $USER \
--chdir $DIR \
--exec $DAEMON \
|| echo -n " not running"
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 15
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
exit 0
Return to TeamDrive Personal Server (TDPS)
Users browsing this forum: No registered users and 27 guests