Line 47:
Line 47:
====start at boot time====
====start at boot time====
now when you launch the command above your JD instance is able to run. we have to create an init script to run JD at the boot time
now when you launch the command above your JD instance is able to run. we have to create an init script to run JD at the boot time
−
+
* create the jdownloader system user
+
/sbin/e-smith/create-system-user jdownloader 810 "Jdownloader server" /usr/share/JD2/ /bin/false
* create the db entry
* create the db entry
db configuration set jdownloader service status enabled
db configuration set jdownloader service status enabled
Line 64:
Line 65:
SCRIPT='java -Djava.awt.headless=true -jar /usr/share/JD2/JDownloader.jar'
SCRIPT='java -Djava.awt.headless=true -jar /usr/share/JD2/JDownloader.jar'
−
RUNAS='root'
+
RUNAS='jdownloader'
NAME='JD2'
NAME='JD2'
Line 77:
Line 78:
echo 'Starting service…' >&2
echo 'Starting service…' >&2
local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!"
local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!"
−
su -c "$CMD" $RUNAS > "$PIDFILE"
+
su -s /bin/sh $RUNAS -c "$CMD" > "$PIDFILE"
# Try with this command line instead of above if not workable
# Try with this command line instead of above if not workable
−
# su -s /bin/sh $RUNAS -c "$CMD" > "$PIDFILE"
+
# su -c "$CMD" $RUNAS > "$PIDFILE"
sleep 2
sleep 2