mirror of
https://github.com/Fluffy-Bean/Lynxie.git
synced 2025-05-29 06:43:14 +00:00
Add open-rc config and woodpecker build
This commit is contained in:
parent
08ab662210
commit
d205cffca1
2 changed files with 63 additions and 0 deletions
38
rc-service
Normal file
38
rc-service
Normal file
|
@ -0,0 +1,38 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
LYNXIE_USER="uncertainty"
|
||||
LYNXIE_CMD="/home/uncertainty/lynxie"
|
||||
APP_NAME="lynxie"
|
||||
|
||||
command="$LYNXIE_CMD"
|
||||
command_args=""
|
||||
command_user="$LYNXIE_USER"
|
||||
pidfile="/var/run/${APP_NAME}.pid"
|
||||
output_log="/var/log/${APP_NAME}.log"
|
||||
error_log="/var/log/${APP_NAME}_error.log"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${APP_NAME}"
|
||||
|
||||
export E621_USERNAME=""
|
||||
export E621_PASSWORD=""
|
||||
export TOKEN=""
|
||||
|
||||
start-stop-daemon --start --user "$LYNXIE_USER" \
|
||||
--make-pidfile --pidfile "$pidfile" \
|
||||
--exec "$command" -- $command_args >> "$output_log" 2>> "$error_log" &
|
||||
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${APP_NAME}"
|
||||
|
||||
start-stop-daemon --stop --pidfile "$pidfile"
|
||||
|
||||
eend $?
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue