681 B
681 B
Create a systemd service unit file under the directory.
$ vim ~/.config/systemd/user/irc_log.service
[Unit]
Description=irc_log
After=network.target
[Service]
ExecStart=/usr/bin/node /home/grizzly/irc/irc_log/index.js
WorkingDirectory=%h/irc/irc_log
Restart=always
[Install]
WantedBy=multi-user.target
Reload systemd.
$ systemctl --user daemon-reload
Confirm the service is available.
$ systemctl --user list-unit-files irc_log.service
You can start the service then after creation.
$ systemctl --user enable --now irc_log.service
Let’s check the status of our service.
$ systemctl --user status irc_log.service