mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-17 08:43:18 +00:00
web interface setup bug fix
This commit is contained in:
9
setup.py
9
setup.py
@@ -14,6 +14,7 @@ from git import RemoteProgress
|
||||
from datetime import datetime
|
||||
from plexapi.server import PlexServer
|
||||
from crontab import CronTab
|
||||
from pathlib import Path
|
||||
|
||||
class CloneProgress(RemoteProgress):
|
||||
def update(self, op_code, cur_count, max_count=None, message=''):
|
||||
@@ -607,10 +608,10 @@ def web_setup():
|
||||
job.every_reboot()
|
||||
cron.write()'''
|
||||
systemctlFileText = "[Unit]\nDescription=PHP Start\n\n[Service]\nType=simple\nTimeoutSec=0\nPIDFile=~/\nExecStart="+php_binary+" -S "+local_ip+":"+portNumber+" -t "+path+"\nKillMode=process\nRestart=on=failure\nRestartSec=12s\n\n[Install]\nWantedBy=default.target"
|
||||
if (os.path.isdir('~/.config/systemd/user/') == False):
|
||||
os.mkdir('~/.config/systemd/user/')
|
||||
if (os.path.isfile('~/.config/systemd/user/php.service') == False):
|
||||
f=open('~/.config/systemd/user/php.service','w+')
|
||||
if (os.path.isdir(str(Path.home())+'/.config/systemd/user/') == False):
|
||||
os.mkdir(str(Path.home())+'/.config/systemd/user/')
|
||||
if (os.path.isfile(str(Path.home())+'/.config/systemd/user/php.service') == False):
|
||||
f=open(str(Path.home())+'/.config/systemd/user/php.service','w+')
|
||||
f.write(systemctlFileText)
|
||||
f.close
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user