Comments (4)
This may be a good example for the init script. Just need to figure out how to get the API from the config file. Got it from here
#! /bin/sh
### BEGIN INIT INFO
# Provides: sabnzbd
# Short-Description: start/stop sabnzbd web interface
### END INIT INFO
USER="username"
HOME="/home/username"
SAB_IP="192.168.2.105:8080"
SAB_USER="login"
SAB_PASS="password"
SAB_APIKEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
case "$1" in
start)
echo "Starting SABnzbd."
/usr/bin/sudo -u $USER -H /usr/bin/sabnzbdplus -d -f $HOME/.sabnzbd/sabnzbd.ini
;;
stop)
echo "Shutting down SABnzbd."
/usr/bin/wget -q --delete-after "http://$SAB_IP/sabnzbd/api?mode=shutdown&ma_username=$SAB_USER&ma_password=$SAB_PASS&apikey=$SAB_APIKEY"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
from atomic-toolkit.
I did an script for myself and its working. I took parts from everywhere on internet. Please be free to use it as an example or for the Atomic toolkit. I am not an expert but tried so many times until I made it work. Please correct any part of it that it's wrong.
`#! /bin/sh
BEGIN INIT INFO
Provides: sabnzbdplus
Required-Start:
Required-Stop:
Should-Start: dbus avahi network-manager wicd
Should-Stop: dbus avahi network-manager wicd
Default-Start: 2 3 4 5
Default-Stop: 0 1 6
Short-Description: SABnzbd+ binary newsgrabber
Description: SABnzbd+ is a web-based binary newsgrabber with nzb
support, designed to download files from Usenet.
This script provides that functionality as a system
service, starting the program on boot.
END INIT INFO
USER="changetoyouruser"
HOME="/home/$USER"
SAB_IP="127.0.0.1:8080"
SAB_APIKEY="insertyourapikey"
DAEMON="/usr/bin/sabnzbdplus"
SETTINGS="$HOME/.sabnzbd/sabnzbd.ini"
##------------------------------------------------------------------------##
case "$1" in
start)
echo "Starting SABnzbd."
/usr/bin/sudo -u $USER -H $DAEMON -d -f $SETTINGS
;;
stop)
echo "Shutting down SABnzbd."
/usr/bin/wget -q --delete-after "http://$SAB_IP/sabnzbd/api?mode=shutdown&apikey=$SAB_APIKEY"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0`
from atomic-toolkit.
I've updated SABnzbd+ to use systemd as default however it does still fallback to init.d if your distro doesnt support it. Can anyone confirm the init.d script is working for them in the new Toolkit version?
from atomic-toolkit.
I've not heard any bad feeback on this so will assume its ok. Please log an issue if anyone finds a problem.
Thanks
from atomic-toolkit.
Related Issues (20)
- NZBHydra v1 No Longer in Development, Can ATK be Updated for NZBHydra2? HOT 1
- Bionic Beaver, various errors during install HOT 3
- Issue when trying to update plex: cannot access '/etc/systemd/system/plexmediaserver.service.d': No such file or directory
- Cant connect to ruTorrent
- Sonarr remains inactive, after fix isn't reachable through reverse proxy HOT 2
- ssl muximux HOT 4
- Version mismatch
- Can't install Filebot
- Plex does not update to latest version.
- Nginx fails to start on rutorrent installation. HOT 6
- Ubuntu 18.04 Errors HOT 2
- Unrar installation error, checkinstall/installwatch permission denied HOT 1
- Lazy Librarian service fails to start, requires samba which was not installed HOT 2
- You need to update the install scripts for the new Sickrage HOT 2
- changed the port of sonarr in the program. sonarr still works fine but the toolkit doesn't like that i changed the ports HOT 8
- installed plexmediaserver package post-installation script subprocess returned error exit status 1 HOT 1
- Support for Organizer V2? HOT 1
- How to restart Sonarr HOT 1
- Deluge failed to install
- mono HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomic-toolkit.