1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lstu_ynh.git synced 2024-09-03 19:36:12 +02:00

Update install

This commit is contained in:
frju365 2017-02-02 20:04:10 +01:00 committed by GitHub
parent f4942fdcfc
commit 61abc74990

View file

@ -72,27 +72,16 @@ sudo sed -i "s@__PORT__@$port@g" "$final_path/lstu.conf"
codename=$(lsb_release -a 2>/dev/null | grep Codename | cut -f 2) codename=$(lsb_release -a 2>/dev/null | grep Codename | cut -f 2)
CHECK_VAR "$codename" "codename empty" CHECK_VAR "$codename" "codename empty"
ynh_app_setting_set $app codename $codename ynh_app_setting_set $app codename $codename
if [ "$codename" = "wheezy" ] sudo cp utilities/lstu.default /etc/default/lstu
then # On utilise le script init pour wheezy.
# Mise en place du script init
sudo cp ../conf/lstu.init /etc/init.d/lstu
sudo cp ../conf/lstu.default /etc/default/lstu
sudo chmod +x /etc/init.d/lstu
sudo chown root: /etc/init.d/lstu /etc/default/lstu
sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/default/lstu
## Démarrage auto du service
sudo update-rc.d lstu defaults
else # Et le script systemd à partir de jessie
# Mise en place du script systemd
sudo cp ../conf/lstu.service /etc/systemd/system/lstu.service sudo cp ../conf/lstu.service /etc/systemd/system/lstu.service
sudo chown root: /etc/systemd/system/lstu.service sudo chown root: /etc/systemd/system/lstu.service
sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/systemd/system/lstu.service sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/systemd/system/lstu.service
## Démarrage auto du service ## Démarrage auto du service
sudo systemctl enable lstu.service sudo systemctl enable lstu.service
fi
## Mise en place des crons ## Mise en place des crons
sudo cp ../conf/cron_lutim /etc/cron.d/$app sudo cp ../conf/cron_lstu /etc/cron.d/$app
sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/cron.d/$app sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/cron.d/$app
sudo chmod +x $final_path/script/lstu sudo chmod +x $final_path/script/lstu