diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/Makefile | 2 | ||||
-rwxr-xr-x | extra/stackbin.init | 3 | ||||
-rw-r--r-- | extra/stackbin.service | 6 | ||||
-rw-r--r-- | extra/stackbin.spec | 2 | ||||
-rw-r--r-- | extra/stackbin.sysusers | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/extra/Makefile b/extra/Makefile index 785d2df..d55b8c6 100644 --- a/extra/Makefile +++ b/extra/Makefile @@ -24,7 +24,7 @@ LIBEXECDIR = $(DESTDIR)$(prefix)/libexec SHAREDIR = $(DESTDIR)$(prefix)/share DOCDIR = $(SHAREDIR)/doc/$(APPNAME) APPDIR = $(SHAREDIR)/$(APPNAME) -APPVARDIR = $(DESTDIR)/var/www/$(APPNAME) +APPVARDIR = $(DESTDIR)/var/$(APPNAME) MANDIR = $(SHAREDIR)/man SYSVDIR = $(SYSCONFDIR)/init.d SYSDDIR = $(DESTDIR)$(prefix)/lib/systemd/system diff --git a/extra/stackbin.init b/extra/stackbin.init index a8cd25e..057c793 100755 --- a/extra/stackbin.init +++ b/extra/stackbin.init @@ -19,11 +19,12 @@ DAEMON=/usr/sbin/stackbin.bin DESC="stackbin" NAME=stackbin PATH=/sbin:/usr/sbin:/bin:/usr/bin -PIDFILE2=/var/run/$NAME-wsgi.pid +PIDFILE2=/var/$NAME/$NAME-wsgi.pid PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME USER=stackbin WSGIBIN=uwsgi_python39 +export STACKBIN_WSGI_INI=/etc/stackbin.wsgi.ini # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 diff --git a/extra/stackbin.service b/extra/stackbin.service index a2ef4b9..d2aad39 100644 --- a/extra/stackbin.service +++ b/extra/stackbin.service @@ -4,14 +4,14 @@ Wants=network-online.target After=network.target syslog.target [Service] -#Environment= -WorkingDirectory=/var/www +Environment=STACKBIN_WSGI_INI=/etc/stackbin.wsgi.ini +WorkingDirectory=/var/stackbin User=stackbin Group=stackbin Type=simple ExecStart=/usr/sbin/stackbin.bin TimeoutStartSec=120 -ExecStop=/usr/sbin/uwsgi --stop /var/run/stackbin-wsgi.pid +ExecStop=/usr/sbin/uwsgi --stop /var/stackbin/stackbin-wsgi.pid RestartSec=15 Restart=always KillSignal=SIGINT diff --git a/extra/stackbin.spec b/extra/stackbin.spec index f9a7792..c5abeb8 100644 --- a/extra/stackbin.spec +++ b/extra/stackbin.spec @@ -24,7 +24,7 @@ %global pythonver python3 %endif -%global _appvardir %{?_localstatedir}%{!?_localstatedir:/var}/www/stackbin +%global _appvardir %{?_localstatedir}%{!?_localstatedir:/var}/stackbin %global _appdir %{?_datarootdir}%{!?_datarootdir:%{_prefix}/share}/stackbin %global _user stackbin diff --git a/extra/stackbin.sysusers b/extra/stackbin.sysusers index e6b7b69..e36f686 100644 --- a/extra/stackbin.sysusers +++ b/extra/stackbin.sysusers @@ -1,3 +1,3 @@ # Part of stackbin package #Type Name ID GECOS Home directory Shell -u stackbin - "stackbin system user" /var/www/stackbin /sbin/nologin +u stackbin - "stackbin system user" /var/stackbin /sbin/nologin |