Bonjour à tous,
Je tente un bash qui me permettrait de mettre off ou on l’api yunohost avec une seule commande. Je pensais au if, mais ne suis pas sur de la syntaxe.
if [status yunohost-api = start ]; then
sudo service yunohost-api stop
fi
&&
if [status yunohost-api = stop ]; then
sudo service yunohost-api start
fi
Actuellement je fonctionne avec un bash ON et bash OFF avec respectivement
sudo service yunohost-api start(/stop).
Merci pour vos retours.
G