mirror of
https://github.com/YunoHost-Apps/lufi_ynh.git
synced 2024-09-03 19:36:28 +02:00
parent
5d4e75aeac
commit
75ea574f3a
3 changed files with 10 additions and 7 deletions
|
@ -10,9 +10,9 @@ User=www-data
|
|||
RemainAfterExit=yes
|
||||
WorkingDirectory=__FINALPATH__
|
||||
PIDFile=__FINALPATH__script/hypnotoad.pid
|
||||
ExecStart=/usr/bin/carton exec hypnotoad script/lufi >> /var/log/lufi/production.log 2>&1
|
||||
ExecStop=/usr/bin/carton exec hypnotoad -s script/lufi >> /var/log/lufi/production.log 2>&1
|
||||
ExecReload=/usr/bin/carton exec hypnotoad script/lufi >> /var/log/lufi/production.log 2>&1
|
||||
ExecStart=/usr/local/bin/carton exec hypnotoad script/lufi >> /var/log/lufi/production.log 2>&1
|
||||
ExecStop=/usr/local/bin/carton exec hypnotoad -s script/lufi >> /var/log/lufi/production.log 2>&1
|
||||
ExecReload=/usr/local/bin/carton exec hypnotoad script/lufi >> /var/log/lufi/production.log 2>&1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -46,6 +46,9 @@ ynh_app_setting_set $app domain $domain
|
|||
ynh_app_setting_set $app is_public $is_public
|
||||
ynh_app_setting_set $app port $port
|
||||
|
||||
# Install build-essential
|
||||
ynh_package_update
|
||||
ynh_package_install build-essential
|
||||
|
||||
# Copy files to the right place
|
||||
sudo mkdir "${final_path}"
|
||||
|
@ -62,9 +65,6 @@ then
|
|||
sudo sed -i "s@#--PRIVATE--@@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
fi
|
||||
|
||||
ynh_package_update
|
||||
ynh_package_install carton
|
||||
|
||||
## Copy and fix variable into lufi config
|
||||
sudo cp ../conf/lufi.conf.template "${final_path}/lufi.conf"
|
||||
sudo sed -i "s@__DOMAIN__@$domain@g" "${final_path}/lufi.conf"
|
||||
|
@ -92,6 +92,9 @@ sudo chmod +x $final_path/script/lufi
|
|||
sed -i "s@__FINALPATH__@$final_path@g" ../conf/logrotate
|
||||
sudo cp ../conf/logrotate /etc/logrotate.d/$app
|
||||
|
||||
# Install Carton
|
||||
sudo cpan Carton
|
||||
|
||||
# Install lufi via carton
|
||||
sudo mkdir -p /var/log/$app/
|
||||
cd $final_path
|
||||
|
|
|
@ -40,7 +40,7 @@ SECURE_REMOVE '/var/log/$app/' # Delete log
|
|||
|
||||
REMOVE_LOGROTATE_CONF # Delete logrotate configuration
|
||||
|
||||
ynh_package_remove carton || echo "Carton already uninstalled"
|
||||
ynh_package_remove build-essential || echo "build-essential already uninstalled"
|
||||
|
||||
# Reload SSOwat configuration
|
||||
sudo yunohost app ssowatconf
|
||||
|
|
Loading…
Add table
Reference in a new issue