From 89663f991b2858b52910ad1b1742576f5d7e9a68 Mon Sep 17 00:00:00 2001 From: Quentin Gibeaux Date: Thu, 8 Nov 2018 18:02:15 +0100 Subject: [PATCH] migrate init.d to systemd service for auto restart --- {init.d => init.d.deprecated}/welcomebot | 0 welcomebot.service | 15 +++++++++++++++ 2 files changed, 15 insertions(+) rename {init.d => init.d.deprecated}/welcomebot (100%) create mode 100644 welcomebot.service diff --git a/init.d/welcomebot b/init.d.deprecated/welcomebot similarity index 100% rename from init.d/welcomebot rename to init.d.deprecated/welcomebot diff --git a/welcomebot.service b/welcomebot.service new file mode 100644 index 0000000..468d663 --- /dev/null +++ b/welcomebot.service @@ -0,0 +1,15 @@ +[Unit] +Description=APRIL IRC bot for april-accueil channel +After=network-online.target + +[Service] +Type=simple +WorkingDirectory=/srv/welcomebot/git +ExecStart=/srv/welcomebot/git/bot.py +User=welcomebot +Group=welcomebot +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target