Hi,
I need to convert a init.d script to systemctl.
In the start() function of my init.d script I have this code:
Code:
start() {
echo -n "Starting SSL-SSH-Switch: "
if [ -f $PIDFILE ]; then
PID=`cat $PIDFILE`
echo sslh already running: $PID
exit 2;
else
daemon --user myuser $SSLH $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $PIDFILE
[ $RETVAL -eq 0 ] && touch $lockfile
ip rule add fwmark 0x1 lookup 100;
ip route add local 0.0.0.0/0 dev lo table 100;
return $RETVAL
fi
}How can I insert this lot of command in a systemctl script?
Can you make an example please?