Start Jnos with Systemd

# Starting Jnos at boot, and restart when fail
# Jnos is running in the background

cd /lib/systemd/system
sudo nano jnos.service

Add to the file

[Unit]
Description=Jnos Daemon
After=network.target
After=sound.target
After=syslog.target

[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart=/bin/bash /home/pd9q/jnos/startnos
WorkingDirectory=/home/pd9q/jnos

[Install]
WantedBy=multi-user.target
Alias=jnos.service

save

sudo systemctl enable jnos.service

startnos

# Jnos start file
cd /home/pd9q/jnos
sleep 2
rm -f /home/pd9q/jnos/spool/mqueue/*.lck 2> /dev/null
rm -f /home/pd9q/jnos/jnos/spool/mail/*.lck 2> /dev/null
sleep 1
TZ='Europe/Amsterdam'; export TZ
export TERM=linux
exec ./jnos2.0m.1rc -C -wf+b -u3 -fnos.cfg -i  </dev/tty2>/dev/tty2 2>&1

sudo apt-get install conspy
sudo conspy 2

And there is jnos….. Hit a couple off times [esc] to exit conspy

sudo systemctl status jnos

pd9q@packet-jnos:~/jnos/logs $ sudo systemctl status jnos
● jnos.service - Jnos Daemon
Loaded: loaded (/lib/systemd/system/jnos.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-02-08 07:36:44 CET; 6h ago
Main PID: 525 (jnos2.0m.1rc)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/jnos.service
└─525 ./jnos2.0m.1rc -C -wf b -u3 -fnos.cfg -i

Feb 08 07:36:44 packet-jnos systemd[1]: Started Jnos Daemon.
pd9q@packet-jnos:~/jnos/logs $

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.