mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
Merge pull request #4 from YunoHost-Apps/frju365-service
Try something service
This commit is contained in:
commit
5ce7ed97d3
3 changed files with 24 additions and 16 deletions
|
@ -1,16 +0,0 @@
|
|||
[Unit]
|
||||
Description=jdownloader
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/jdownloader/
|
||||
User=admin
|
||||
Group=users
|
||||
Type=simple
|
||||
UMask=000
|
||||
ExecStart=/usr/bin/java -Djava.awt.headless=true -jar JDownloader.jar
|
||||
RestartSec=15
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
15
conf/systemd.service
Normal file
15
conf/systemd.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=CodiMD service.
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__
|
||||
Environment="PATH=__ENV_PATH__"
|
||||
ExecStart=__NODE__ app.js
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -149,6 +149,15 @@ popd
|
|||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "/etc/systemd/system/$app.service"
|
||||
ynh_replace_string "__ENV_PATH__" "$PATH" "/etc/systemd/system/$app.service"
|
||||
ynh_replace_string "__NODE__" "$nodejs_path" "/etc/systemd/system/$app.service"
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue