prawnsalad / KiwiIRC

This is **DEPRECATED**! Please go to https://github.com/kiwiirc/kiwiirc
https://kiwiirc.com
GNU Affero General Public License v3.0
891 stars 277 forks source link

init.d.example #914

Open TheBeerbarian opened 7 years ago

TheBeerbarian commented 7 years ago

I have seen the question come from people wanting service to start/stop on system boot/reboot. Some nice people have helped out with more than adequate solutions.

If you would like this init.d.example file, maybe it can be added to the distribution may help some people out. If not at the root, maybe in a contrib folder?

This example file works on Debian using systemctl.

ShadowNinja commented 7 years ago

FWIW, here's a Systemd unit file I use.

[Unit]
Description=KiwiIRC webchat
After=network.target

[Service]
Type=forking
User={{ user }}
Group={{ user }}
ProtectSystem=full
NoNewPrivileges=true
PrivateDevices=true
PIDFile={{ user_dir }}/KiwiIRC/kiwiirc.pid
ExecStart={{ user_dir }}/KiwiIRC/kiwi start
ExecStop={{ user_dir }}/KiwiIRC/kiwi stop
ExecReload={{ user_dir }}/KiwiIRC/kiwi reconfig

[Install]
WantedBy=multi-user.target
dasJ commented 7 years ago

@ShadowNinja's approach seems better for Debian as it dosn't use legacy systemd interfaces