On Tue, Jun 07, 2011 at 01:56:33PM +0200, Devil505 <[email protected]> wrote: > Of course, here are FrugalBuild with files.
Sorry for not responding earlier, so I'm attaching a patch that works
here.
What I changed:
- depends fix
- backup fix
- system unit fix
I would recommend running at least systemctl daemon-reload on
install/upgrade/remove so systemd will be aware of the new service file.
In its current form a user can't run "systemctl start sabnzbd.service".
Explaining the systemd part:
- first, /etc/sysconfig/$name is not magically sourced, you need an
EnvironmentFile= line for that
- I've removed the -d option and Type=forking: in systemd we try to run
daemons in the foreground, so even if the process forks off multiple
processes, it'll be obvious which process to kill first on stop
- ExecStart needs a full path of the program, if /bin/foo, not foo
- as you already figured, ExecStart supports variables, but $foo and
${foo} has a different meaning. if $foo may contain spaces and that
may mean multiple arguments, then you need $foo. if you want the
variable to become part of a string, you need ${foo}
Oh, and probably rename .confd to .sysconfig. :)
Thanks.
diff --git a/source/network-extra/sabnzbd/FrugalBuild b/source/network-extra/sabnzbd/FrugalBuild index f138ba1..f03197b 100644 --- a/source/network-extra/sabnzbd/FrugalBuild +++ b/source/network-extra/sabnzbd/FrugalBuild @@ -7,10 +7,10 @@ pkgrel=1 pkgdesc="A web-interface based binary newsgrabber with NZB file support" url="http://mookooh.org/coverfinder/" depends=('par2cmdline' 'python-cheetah' 'feedparser' 'python-yenc' 'pyopenssl' \ - 'unrar' 'unzip' 'sqlite3' 'curl') + 'unrar' 'unzip' 'pyhton-sqlite3' 'curl') groups=('network-extra') archs=('i686' 'x86_64') -backup=('etc/conf.d/sabnzbd' 'usr/share/sabnzbd/sabnzbd.ini') +backup=('etc/sysconfig/sabnzbd' 'usr/share/sabnzbd/sabnzbd.ini') _F_sourceforge_ext="-src.tar.gz" _F_sourceforge_name="SABnzbd" _F_sourceforge_dirname="sabnzbdplus" @@ -48,4 +48,4 @@ build() { Ficon sab2_64.png Fexe addnzb.sh usr/share/$pkgname/addnzb.sh Finstall 770 x-nzb.xml usr/share/$pkgname/x-nzb.xml -} \ No newline at end of file +} diff --git a/source/network-extra/sabnzbd/sabnzbd.service b/source/network-extra/sabnzbd/sabnzbd.service index 337dcb3..3dddcd6 100644 --- a/source/network-extra/sabnzbd/sabnzbd.service +++ b/source/network-extra/sabnzbd/sabnzbd.service @@ -3,8 +3,8 @@ Description=Web-interface based binary newsgrabber with NZB file support After=syslog.target [Service] -ExecStart=su - $SABNZBD_USER -c "python /usr/share/sabnzbd/SABnzbd.py -f $SABNZBD_CONF -s $SABNZBD_IP:$SABNZBD_PORT -d" -s /bin/sh -Type=forking +EnvironmentFile=/etc/sysconfig/sabnzbd +ExecStart=/bin/su - $SABNZBD_USER -c "python /usr/share/sabnzbd/SABnzbd.py -f ${SABNZBD_CONF} -s ${SABNZBD_IP}:${SABNZBD_PORT}" -s /bin/sh [Install] WantedBy=multi-user.target
pgpNqcHTlexW3.pgp
Description: PGP signature
_______________________________________________ Frugalware-devel mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-devel
