Skip to content
This repository was archived by the owner on Mar 26, 2020. It is now read-only.

Commit 37715c8

Browse files
committed
Add file to generate systemd service file
1 parent 9a2a426 commit 37715c8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.log
22
.idea
33
.pid
4+
.env
45
config.yml

scripts/generate_systemd_service.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
#!/bin/bash
4+
5+
C_DIR=`dirname "$(readlink -f $0)"`
6+
cat > nyachan.service <<- EOM
7+
[Unit]
8+
Description=Nya-Chan Discord bot service
9+
10+
[Service]
11+
Type=simple
12+
ExecStart=/bin/bash ${C_DIR}/start.sh
13+
ExecStop=/bin/bash ${C_DIR}/stop.sh
14+
15+
[Install]
16+
WantedBy=multi-user.target
17+
EOM

0 commit comments

Comments
 (0)