mirror of
https://github.com/YunoHost-Apps/turtl_ynh.git
synced 2024-09-03 20:26:35 +02:00
Add turtl.service
This commit is contained in:
parent
7963f5e948
commit
aa37ae9d53
3 changed files with 24 additions and 0 deletions
17
conf/turtl.service
Normal file
17
conf/turtl.service
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=Note taking service
|
||||
Documentation=http://turtl.it
|
||||
Requires=network.target
|
||||
Requires=rethinkdb.service
|
||||
After=network.target
|
||||
After=rethinkdb.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=www-data
|
||||
WorkingDirectory=/var/www/turtl/api/
|
||||
ExecStart=/usr/bin/ccl -Q -b --load start.lisp
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -161,7 +161,10 @@ sudo cp ../conf/logrotate.conf /etc/logrotate.d/turtl
|
|||
# ENABLE SERVICE IN ADMIN PANEL
|
||||
#=================================================
|
||||
# Add service to Yunohost monitoring
|
||||
sudo cp ../conf/turtl.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo yunohost service add turtl --log "/var/log/turtl/turtl.log"
|
||||
sudo yunohost service start turtl
|
||||
|
||||
#=================================================
|
||||
# NGINX
|
||||
|
|
|
@ -27,6 +27,10 @@ domain=$(ynh_app_setting_get "$app" domain)
|
|||
if sudo yunohost service status | grep -q turtl # Test l'existence du service dans Yunohost
|
||||
then
|
||||
echo "Remove turtl service"
|
||||
sudo systemctl stop turtl
|
||||
sudo systemctl disable turtl
|
||||
ynh_package_remove "/etc/systemd/system/turtl.service"
|
||||
sudo systemctl daemon-reload
|
||||
sudo yunohost service remove turtl
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue