Don't require dynamic apps to have service file

This commit is contained in:
Taylor Helsper 2022-12-29 20:14:49 -06:00
parent 3bfc607abc
commit 6620caec0d

View File

@ -763,7 +763,8 @@ def init_dynamic_app(app_info):
app_name = app_info["short_name"]
app_dir = DYNAMIC_APPLICATIONS_FOLDER + "/" + app_name
log_message(" Loading " + app_name + "...")
# Install Service File
# Install Service File (if exists)
if (os.path.isfile(app_dir+"/"+app_name+".service")):
os.system("cp -f {} {}".format(app_dir+"/"+app_name+".service", "/etc/systemd/system/"+app_name+".service"))
# Install App Icon
os.system("cp -f {} {}".format(app_dir+"/"+app_name+".png", "/var/www/mynode/static/images/app_icons/"+app_name+".png"))