diff --git a/conf/lufi.service b/conf/lufi.service index 0f3b7ce..5f2f072 100644 --- a/conf/lufi.service +++ b/conf/lufi.service @@ -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 diff --git a/scripts/install b/scripts/install index ad3e6be..abd4f9b 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/remove b/scripts/remove index 3171afe..24167b6 100644 --- a/scripts/remove +++ b/scripts/remove @@ -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