summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDictator Mei2018-08-16 23:44:11 +0900
committerDictator Mei2018-08-16 23:44:11 +0900
commit7cfafdaee52f2e8b61fcaf49e7c0ba64005d0ed7 (patch)
tree63df4d83d39323670a186a8faacb538b7bae8bb0
parent42805848147e7ad41bd06fc636c33a01a3288bde (diff)
downloadaur-7cfafdaee52f2e8b61fcaf49e7c0ba64005d0ed7.tar.gz
add systemd
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD7
-rw-r--r--qqbot.service13
3 files changed, 20 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2f5e7099b32..478dcba3678 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -14,7 +14,9 @@ pkgbase = qqbot
optdepends = python-wcwidth: For cmdQrcode
optdepends = shotwell: Automatically pop up QR code image
source = https://github.com/pandolia/qqbot/archive/v2.3.10.tar.gz
+ source = qqbot.service
sha512sums = c72f8a1c153c97a50adfaeb7704cbdacebcdd01b4a603e1a34ab571447cf3a2747c4da6480f7ce070eccd2b7fe5e3306924a111be1f680947fab245ee266a813
+ sha512sums = 88d5333217d868b227401cc4a954d547139272fef753384a5d885a21ca640bcd9529b2e98a02a7fb9ebd3b2a57bc634aefb3c3dedc09e5d9378ad827ffa629af
pkgname = qqbot
diff --git a/PKGBUILD b/PKGBUILD
index 468efa978ef..ee75d291f1d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,8 +11,10 @@ optdepends=("gvfs: Automatically pop up QR code image"
"python-pillow: For cmdQrcode"
"python-wcwidth: For cmdQrcode"
"shotwell: Automatically pop up QR code image")
-source=("https://github.com/pandolia/qqbot/archive/v$pkgver.tar.gz")
-sha512sums=('c72f8a1c153c97a50adfaeb7704cbdacebcdd01b4a603e1a34ab571447cf3a2747c4da6480f7ce070eccd2b7fe5e3306924a111be1f680947fab245ee266a813')
+source=("https://github.com/pandolia/qqbot/archive/v$pkgver.tar.gz"
+ "qqbot.service")
+sha512sums=("c72f8a1c153c97a50adfaeb7704cbdacebcdd01b4a603e1a34ab571447cf3a2747c4da6480f7ce070eccd2b7fe5e3306924a111be1f680947fab245ee266a813"
+ "88d5333217d868b227401cc4a954d547139272fef753384a5d885a21ca640bcd9529b2e98a02a7fb9ebd3b2a57bc634aefb3c3dedc09e5d9378ad827ffa629af")
build() {
cd "$srcdir"/qqbot-$pkgver
@@ -23,4 +25,5 @@ package() {
cd qqbot-$pkgver
python setup.py install --root="$pkgdir"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -d "$pkgdir"/etc/$_pkgname
}
diff --git a/qqbot.service b/qqbot.service
new file mode 100644
index 00000000000..fe100bcd8ad
--- /dev/null
+++ b/qqbot.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=QQBot Service
+After=network.target
+Wants=network.target
+
+[Service]
+Type=simple
+PIDFile=/var/run/qqbot.pid
+ExecStart=/usr/bin/qqbot -u /etc/qqbot
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target