Développeur FullStack & Devops

Notes et mémos techniques

DSM Synology

Gestion des services

Synology a doté ses NAS d’un OS Linux (sous jacent au DSM qui est son système d'exploitation Web) avec des outils d’administration en CLI disponible en ssh. :
  • synoservicectl
  • synoservicecfg

synoservicectl

SynoService Tool Help (Version 24922)<br>
Usage: synoservice<br>
--help Show this help<br>
--help-dev More specialty functions for deveplopment<br>
--is-enabled [ServiceName] Check if the service is enabled<br>
--status [ServiceName] Get the status of specified services<br>
--enable [ServiceName] Set runkey to yes and start the service (alias to --start)<br>
--disable [ServiceName] Set runkey to no and stop the service (alias to --stop)<br>
--hard-enable [ServiceName] Set runkey to yes and start the service and its dependency (alias to --hard-start)<br>
--hard-disable [ServiceName] Set runkey to no and stop the service and its dependency (alias to --hard-stop)<br>
--restart [ServiceName] Restart the given service<br>
--reload [ServiceName] Reload the given service<br>
--pause [ServiceName] Pause the given service<br>
--resume [ServiceName] Resume the given service<br>
--pause-by-reason [ServiceName] [Reason] Pause the service by given reason<br>
--resume-by-reason [ServiceName] [Reason] Resume the service by given reason<br>
--pause-all (-p) <a href="Event">Reason</a> Pause all service by given reason with optional event(use -p to include packages)<br>
--pause-all-no-action (-p) <a href="Event">Reason</a> Set all service runkey to no but leave the current service status(use -p to include packages)<br>
--resume-all (-p) [Reason] Resume all service by given reason(use -p to include packages)<br>
--reload-by-type <a href="buffer">type</a> Reload services with specified type<br>
--restart-by-type <a href="buffer">type</a> Restart services with specified type<br>
Type may be {file_protocol|application}<br>
Sleep $buffer seconds before exec the command (default is 0)

synoservicecfg

SynoService Control Tool Help (Version 24922)<br>
Usage: synoservicectl<br>
--help Show This Help<br>
--start Start service.<br>
--stop Stop service.<br>
--restart Restart service.<br>
--reload Send HUP signal to service..<br>
--status Query status of service.<br>
--push-arg JobName arg1 arg2 …<br>
Push arguments to specific job.<br>
--dump-arg JobName<br>
Dump arguments of the given job.

Désinstaller Universal Search

L’outil universal Search présent dans les NAS DSM de Synology peut être utile si on utilise l’interface de son NAS pour naviguer dans ses fichiers sauvegardés, sinon c’est un service qui consomme inutilement les ressources limités du NAS, d’où l’utilité de le désinstaller.

DSM Universal Search

Pour cela se connecter en ssh à son DSM puis :

sudo -i # passer root
synoservicecfg --disable pkgctl-SynoFinder # désactiver le service

# résultat de la commande précédente: warn: The runkey of service [pkgctl-SynoFinder] has been set to "No"

synopkg uninstall SynoFinder # désinstaller le service
dsm
synology
linux
devops
rédigé le 02/11/19 par Behrouze
A proposCheat SheetsOutilsVidéos