1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pytition_ynh.git synced 2024-09-03 20:16:08 +02:00

Tweak explanation about "yunohost service add" + add tips for 3.8

This commit is contained in:
Alexandre Aubin 2019-11-27 19:34:37 +01:00 committed by GitHub
parent f2a938fcb0
commit c75ccb8ba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -283,20 +283,26 @@ ynh_script_progression --message="Configuring log rotation..." --time --weight=1
ynh_use_logrotate ynh_use_logrotate
#================================================= #=================================================
# ADVERTISE SERVICE IN ADMIN PANEL # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
### `yunohost service add` is a CLI yunohost command to add a service in the admin panel. ### `yunohost service add` integrates a service in YunoHost. It then gets
### You'll find the service in the 'services' section of YunoHost admin panel. ### displayed in the admin interface and through the others `yunohost service` commands.
### This CLI command would be useless if the app does not have any services (systemd or sysvinit) ### (N.B. : this line only makes sense if the app adds a service to the system!)
### If you're not using these lines: ### If you're not using these lines:
### - You can remove these files in conf/. ### - You can remove these files in conf/.
### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script ### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script
### - As well as the section "ADVERTISE SERVICE IN ADMIN PANEL" in the restore script ### - As well as the section "ADVERTISE SERVICE IN ADMIN PANEL" in the restore script
yunohost service add $app --log "/var/log/$app/$app.log" yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log"
# if using yunohost version 3.2 or more in the 'manifest.json', a description can be added
#yunohost service add $app --description "$app daemon for XXX" --log "/var/log/$app/$app.log" ### With YunoHost 3.8 you will then be able to:
### - specify a list of ports that needs to be publicly exposed (c.f. --needs_exposed_ports)
### which will then be checked by YunoHost's diagnosis system
### - specify a custom command to check the status of the service (c.f. --test_status)
### though it's only needed for weird cases where 'systemctl status' doesn't do a good job
### - specify a custom command to check / validate the configuration of the service (c.f. --test_conf)
### for example, the command to check the configuration of nginx is "nginx -t"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE