fix pid
This commit is contained in:
parent
29204b6fb5
commit
4fd865efeb
2 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ WorkingDirectory=/srv/pandora/pandora
|
|||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
ExecStartPre=/srv/pandora/pandora/manage.py compile_pyc -p /srv/pandora/pandora
|
||||
ExecStart=/srv/pandora/bin/gunicorn wsgi:application -c gunicorn_config.py -p $MAINPID
|
||||
ExecStart=/srv/pandora/bin/gunicorn wsgi:application -c gunicorn_config.py -p /run/pandora/pandora.pid
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -71,7 +71,7 @@ def check_services(base):
|
|||
p.wait()
|
||||
if p.returncode != 0:
|
||||
print('Please install init script for "%s" service:' % service)
|
||||
if os.path.exists('/etc/init'):
|
||||
if os.path.exists('/etc/init') and not os.path.exists('/bin/systemctl'):
|
||||
print('\tsudo cp %s/etc/init/%s.conf /etc/init/' % (base, service))
|
||||
if os.path.exists('/lib/systemd/system'):
|
||||
print('\tsudo cp %s/etc/systemd/%s.service /lib/systemd/system/' % (base, service))
|
||||
|
@ -186,7 +186,7 @@ if __name__ == "__main__":
|
|||
run('./pandora/manage.py', 'migrate', '--fake-initial', '--noinput')
|
||||
service = 'pandora'
|
||||
print('Please install new init script for "%s" service:' % service)
|
||||
if os.path.exists('/etc/init'):
|
||||
if os.path.exists('/etc/init/%s.conf'%service):
|
||||
print('\tsudo cp %s/etc/init/%s.conf /etc/init/' % (base, service))
|
||||
if os.path.exists('/lib/systemd/system'):
|
||||
print('\tsudo cp %s/etc/systemd/%s.service /lib/systemd/system/' % (base, service))
|
||||
|
@ -209,7 +209,7 @@ if __name__ == "__main__":
|
|||
if old > 5389:
|
||||
service = 'pandora'
|
||||
print('Please install new init script for "%s" service:' % service)
|
||||
if os.path.exists('/etc/init'):
|
||||
if os.path.exists('/etc/init/%s.conf'%service):
|
||||
print('\tsudo cp %s/etc/init/%s.conf /etc/init/' % (base, service))
|
||||
if os.path.exists('/lib/systemd/system'):
|
||||
print('\tsudo cp %s/etc/systemd/%s.service /lib/systemd/system/' % (base, service))
|
||||
|
|
Loading…
Reference in a new issue