1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tiddlywiki_ynh.git synced 2024-09-03 20:26:34 +02:00
This commit is contained in:
ericgaspar 2021-02-16 16:37:57 +01:00
parent b1299fbf4c
commit 04fcb6e460
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 16 additions and 5 deletions

View file

@ -7,10 +7,10 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
Environment="NODE_ENV=production" ExecStart=__NODEJS_PATH__/node __FINALPATH__/tiddlywiki monwiki --listen port=__port__ authenticated-user-header=basic
Environment="__YNH_NODE_LOAD_PATH__"
ExecStart=__FINALPATH__/ mywiki --listen port=__port__ authenticated-user-header=basic
Restart=always Restart=always
Environment=PATH=/usr/bin:/usr/local/bin:__NODEJS_PATH__
Environment=NODE_ENV=production
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -92,12 +92,23 @@ ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user # Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# SPECIFIC SETUP
#=================================================
ynh_script_progression --message="tiddlywiki..." --weight=2
pushd $final_path
$nodejs_path/node $final_path/tiddlywiki monwiki --init server
popd
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_add_systemd_config --others_var=ynh_node_load_PATH ynh_replace_string --match_string="__NODEJS_PATH__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__port__" --replace_string="$port" --target_file="../conf/systemd.service"
ynh_add_systemd_config
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION