1
0
Fork 0

Merge branch 'CyberTailor-master'

This commit is contained in:
Casey 2023-05-10 09:12:05 +03:00
commit a94c842340
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
3 changed files with 55 additions and 1 deletions

26
contrib/mastoposter.initd Normal file
View File

@ -0,0 +1,26 @@
#!/sbin/openrc-run
# mastoposter - configurable reposter from Mastodon-compatible Fediverse servers
# Copyright (C) 2022-2023 hatkidchan <hatkidchan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# shellcheck shell=sh
command="/usr/bin/mastoposter"
command_args="${MASTOPOSTER_CONFIG_FILE:=/etc/mastoposter/config.ini}"
command_background=1
pidfile="/run/${RC_SVCNAME}.pid"
output_log="/var/log/${RC_SVCNAME}.log"
error_log="${output_log}"
depend() {
need net
}

View File

@ -0,0 +1,28 @@
# mastoposter - configurable reposter from Mastodon-compatible Fediverse servers
# Copyright (C) 2022-2023 hatkidchan <hatkidchan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
[Unit]
Description=Configurable reposter from Mastodon-compatible Fediverse servers
After=network.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/mastoposter /etc/mastoposter/config.ini
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=inherit
[Install]
WantedBy=multi-user.target

View File

@ -34,4 +34,4 @@ Source = "https://github.com/hatkidchan/mastoposter"
mastoposter = "mastoposter.__main__:main" mastoposter = "mastoposter.__main__:main"
[tool.flit.sdist] [tool.flit.sdist]
include = ["config.ini"] include = ["config.ini", "contrib/*"]