irc_log/user-systemd/irc_log.md

681 B
Raw Blame History

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

Lets check the status of our service.

$ systemctl --user status irc_log.service