Auteur Topic: Packages opstarten via command line  (gelezen 4676 keer)

Dit onderwerp bevat een als beste antwoord gemarkeerd bericht. Klik hier om er direct naartoe te gaan.

Offline mc_

  • Bedankjes
  • -Gegeven: 12
  • -Ontvangen: 31
  • Berichten: 238
Packages opstarten via command line
« Gepost op: 07 februari 2020, 19:39:39 »
Ik gebruik sinds kort Monit (package in de bèta repository van Syno Community) om oa Domoticz en MyDomoAtHome te monitoren. De laatste vliegt er nog wel 's uit en Monit start 'm vervolgens keurig weer op. Blij mee dus.

Om Monit te gebruiken dien je de start/stop scripts op te geven van de te monitoren packages. Voor MyDomoAtHome gebruik ik het volgende commando om te starten:

/usr/syno/sbin/synoservice --enable pkgctl-MyDomoAtHomeof
/usr/syno/sbin/synoservice --restart pkgctl-MyDomoAtHome
In beide gevallen start het package, maar in het Package Center staat het pakket nog als inactief (Run knop is beschikbaar).
- is er een verschil tussen starten in Package Center en via command line? Kennelijk wel
- is er een verschil tussen restart en enable?
- gebruik ik het juiste commando om te starten?
  • Mijn Synology: DS1520+
  • HDD's: WD80EDAZ/WD40EFRX

Offline Birdy

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 1336
  • -Ontvangen: 7772
  • Berichten: 43.099
  • FIFO / LIFO
    • Truebase
Re: Packages opstarten via command line
« Reactie #1 Gepost op: 07 februari 2020, 23:42:21 »
Dit zijn de mogelijkheden, met uitleg:

--enable, --disable
Enable or disable the specified service.
Not only the specified service will be saved to the current settings once the service has been enabled or disabled, the service will also be started or stopped immediately.

--start, --stop, --restart
Start, stop, or restart the specified service without modifying the settings.
Before starting the service, it will check if the service has been enabled yet.


CS406      DSM 2.0-0731    DS508      DSM 4.0-2265      DS411+II  DSM 6.2.4-25556-7   DS115J    DSM 7.1.1-42962-5   DS918+    DSM 6.2.4-25556-7
DS107+     DSM 3.1-1639    DS411slim  DSM 6.2.4-25556   DS213J    DSM 6.2.3-25426-2   DS1515+   DSM 6.2.4-25556-7   DS220+    DSM 7.2.1-69057-4
DS107+     DSM 3.1-1639    DS111      DSM 5.2-5967-9    DS413J    DSM 6.2.3-25426-2   DS716+II  DSM 6.2.4-25556-7   RT2600ac  SRM 1.2.5-8227-11
BeeDrive 1TB                                                                                                        MR2200ac  SRM 1.2.5-8227-11

Offline mc_

  • Bedankjes
  • -Gegeven: 12
  • -Ontvangen: 31
  • Berichten: 238
Re: Packages opstarten via command line
« Reactie #2 Gepost op: 08 februari 2020, 16:53:20 »
Dank, @Birdy. Het bevestigt dat ik beide kan gebruiken. Het verklaart niet waarom de status in Package Manager niet geüpdatet wordt. Daar ook gedachten over?
  • Mijn Synology: DS1520+
  • HDD's: WD80EDAZ/WD40EFRX

Offline Birdy

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 1336
  • -Ontvangen: 7772
  • Berichten: 43.099
  • FIFO / LIFO
    • Truebase
Re: Packages opstarten via command line
« Reactie #3 Gepost op: 08 februari 2020, 17:47:27 »
Ik heb het even getest met de standaard package "Text Editor":

Package staat op Stopped: --enable > Package staat nog steeds op Stopped maar Package werkt wel > Fout
Package staat op Stopped: --start > Package staat op Running > Goed
Package staat op Stopped: --restart Package staat nog steeds op Stopped en Package werkt niet > Goed

Package staat op Running: --disable > Package staat op Stopped > Goed
Package staat op Running: --stop > Package staat op Stopped > Goed
Package staat op Running: --restart > Package staat op Running > Goed

Trek je conclusie. ;)


CS406      DSM 2.0-0731    DS508      DSM 4.0-2265      DS411+II  DSM 6.2.4-25556-7   DS115J    DSM 7.1.1-42962-5   DS918+    DSM 6.2.4-25556-7
DS107+     DSM 3.1-1639    DS411slim  DSM 6.2.4-25556   DS213J    DSM 6.2.3-25426-2   DS1515+   DSM 6.2.4-25556-7   DS220+    DSM 7.2.1-69057-4
DS107+     DSM 3.1-1639    DS111      DSM 5.2-5967-9    DS413J    DSM 6.2.3-25426-2   DS716+II  DSM 6.2.4-25556-7   RT2600ac  SRM 1.2.5-8227-11
BeeDrive 1TB                                                                                                        MR2200ac  SRM 1.2.5-8227-11

Offline Briolet

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 176
  • -Ontvangen: 2619
  • Berichten: 16.242
Re: Packages opstarten via command line
« Reactie #4 Gepost op: 08 februari 2020, 17:54:41 »
Waarschijnlijk roept de package manager deze routine ook aan en update zijn status als het gelukt is. Als je de routine rechtstreeks aanroept, heeft package manager er geen weet van en vertrouwd op zijn database.

In elk package zelf staat ook een "start-stop-status' script dat specifiek per package aangepast is. Misschien moet die aangeroepen worden?
  • Mijn Synology: DS415+
  • HDD's: 3x 3TB in SHR
  • Extra's: DS212J (Backup)

Offline Birdy

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 1336
  • -Ontvangen: 7772
  • Berichten: 43.099
  • FIFO / LIFO
    • Truebase
Re: Packages opstarten via command line
« Reactie #5 Gepost op: 08 februari 2020, 18:01:20 »
Alles werkt toch gewoon goed, behalve --enable
Alleen bij Monit niet en --enable is op zich een rare functie.


CS406      DSM 2.0-0731    DS508      DSM 4.0-2265      DS411+II  DSM 6.2.4-25556-7   DS115J    DSM 7.1.1-42962-5   DS918+    DSM 6.2.4-25556-7
DS107+     DSM 3.1-1639    DS411slim  DSM 6.2.4-25556   DS213J    DSM 6.2.3-25426-2   DS1515+   DSM 6.2.4-25556-7   DS220+    DSM 7.2.1-69057-4
DS107+     DSM 3.1-1639    DS111      DSM 5.2-5967-9    DS413J    DSM 6.2.3-25426-2   DS716+II  DSM 6.2.4-25556-7   RT2600ac  SRM 1.2.5-8227-11
BeeDrive 1TB                                                                                                        MR2200ac  SRM 1.2.5-8227-11

Offline mc_

  • Bedankjes
  • -Gegeven: 12
  • -Ontvangen: 31
  • Berichten: 238
Re: Packages opstarten via command line
« Reactie #6 Gepost op: 09 februari 2020, 15:54:14 »
Dank allen. Ik draai 'm nu met start en stop en dat werkt goed.
  • Mijn Synology: DS1520+
  • HDD's: WD80EDAZ/WD40EFRX

Offline Birdy

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 1336
  • -Ontvangen: 7772
  • Berichten: 43.099
  • FIFO / LIFO
    • Truebase
Re: Packages opstarten via command line
« Reactie #7 Gepost op: 09 februari 2020, 16:40:32 »
 :thumbup:


CS406      DSM 2.0-0731    DS508      DSM 4.0-2265      DS411+II  DSM 6.2.4-25556-7   DS115J    DSM 7.1.1-42962-5   DS918+    DSM 6.2.4-25556-7
DS107+     DSM 3.1-1639    DS411slim  DSM 6.2.4-25556   DS213J    DSM 6.2.3-25426-2   DS1515+   DSM 6.2.4-25556-7   DS220+    DSM 7.2.1-69057-4
DS107+     DSM 3.1-1639    DS111      DSM 5.2-5967-9    DS413J    DSM 6.2.3-25426-2   DS716+II  DSM 6.2.4-25556-7   RT2600ac  SRM 1.2.5-8227-11
BeeDrive 1TB                                                                                                        MR2200ac  SRM 1.2.5-8227-11

Offline Pippin

  • MVP
  • *
  • Bedankjes
  • -Gegeven: 103
  • -Ontvangen: 524
  • Berichten: 2.719
  • a.k.a. MMD
Re: Packages opstarten via command line
« Reactie #8 Gepost op: 09 februari 2020, 18:25:06 »
Is enable/disable niet voor autoboot en start/stop gewoon start/stop?

Net als met systemd...
DS414
OpenVPN #1: Beter beveiligen OpenVPN #2: Beter beveiligen als client

I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

Offline mc_

  • Bedankjes
  • -Gegeven: 12
  • -Ontvangen: 31
  • Berichten: 238
Re: Packages opstarten via command line
« Reactie #9 Gepost op: 09 februari 2020, 19:34:57 »
Zou kunnen. Maar start/stop staan niet in de synoservice help...

        --help                                                  Show this help
        --help-dev                                              More specialty functions for deveplopment
        --is-enabled            [ServiceName]                   Check if the service is enabled
        --status                [ServiceName]                   Get the status of specified services
        --enable                [ServiceName]                   Set runkey to yes and start the service (alias to --start)
        --disable               [ServiceName]                   Set runkey to no and stop the service (alias to --stop)
        --hard-enable           [ServiceName]                   Set runkey to yes and start the service and its dependency (alias to --hard-start)
        --hard-disable          [ServiceName]                   Set runkey to no and stop the service and its dependency (alias to --hard-stop)
        --restart               [ServiceName]                   Restart the given service
        --reload                [ServiceName]                   Reload the given service
        --pause                 [ServiceName]                   Pause the given service
        --resume                [ServiceName]                   Resume the given service
        --pause-by-reason       [ServiceName]   [Reason]        Pause the service by given reason
        --resume-by-reason      [ServiceName]   [Reason]        Resume the service by given reason
        --pause-all             (-p)    [Reason]        (Event) Pause all service by given reason with optional event(use -p to include packages)
        --pause-all-no-action   (-p)    [Reason]        (Event) Set all service runkey to no but leave the current service status(use -p to include packages)
        --resume-all            (-p)    [Reason]                Resume all service by given reason(use -p to include packages)
        --reload-by-type        [type]          (buffer)        Reload services with specified type
        --restart-by-type       [type]          (buffer)        Restart services with specified type
                                                                Type may be {file_protocol|application}
                                                                Sleep $buffer seconds before exec the command (default is 0)
  • Mijn Synology: DS1520+
  • HDD's: WD80EDAZ/WD40EFRX

Offline Briolet

  • Global Moderator
  • MVP
  • *
  • Bedankjes
  • -Gegeven: 176
  • -Ontvangen: 2619
  • Berichten: 16.242
Re: Packages opstarten via command line
« Reactie #10 Gepost op: 09 februari 2020, 22:24:01 »
Citaat
Maar start/stop staan niet in de synoservice help...

In zekere zin wel want er staat:

--enable   … (alias to --start)
--disable  …  (alias to --stop)

Maar een alias is identiek aan het origineel dus staat het fout in de help.
  • Mijn Synology: DS415+
  • HDD's: 3x 3TB in SHR
  • Extra's: DS212J (Backup)

Gemarkeerd als beste antwoord door mc_ Gepost op 06 juni 2020, 11:44:02

Offline sciurius

  • MVP
  • *
  • Bedankjes
  • -Gegeven: 22
  • -Ontvangen: 37
  • Berichten: 411
  • Arms are made for hugging
Re: Packages opstarten via command line
« Reactie #11 Gepost op: 10 februari 2020, 10:02:51 »
Ik gebruik synopkgctl. Bv.

synopkg start nextcloud

start Nextcloud en hij is dan ook running in het package center.
  • Mijn Synology: DS418
  • HDD's: 2 x WD8003FFBX
DS418 / DSM 6.2.4-25556 Update 7 / 2 x WD8003FFBX (SHR) / Dovecot / Nextcloud / Transmission / ResilioSync / SynchThing / Spotweb / Logitech Media Server + Spotify
DS413 / DSM 6.2.4-25556 Update 7 / 2 x ST3000DM001-1CH166 (SHR) 2 x WD40EFRX-68WT0N0 (SHR) / Testing
RaspberryPi 4 4GB / SSD 256GB / Nextcloud / Logitech Media Server + Spotify / PostgreSQL / DAViCal / Domoticz / Custom services
HP tn520 / HomeAssistant


 

DS-212j uitbreiden met nieuwe harddisk. Wat gebeurt met packages?

Gestart door flyer2Board NAS hardware vragen

Reacties: 4
Gelezen: 1737
Laatste bericht 12 juni 2015, 18:09:17
door Ben(V)
Installeren packages op verse DS214+

Gestart door bartmans99Board 3rd party Packages

Reacties: 1
Gelezen: 2405
Laatste bericht 08 januari 2014, 16:39:31
door bartmans99
.spk packages maken

Gestart door UnderlyingglitchBoard 3rd party apps integratie in DSM

Reacties: 2
Gelezen: 5772
Laatste bericht 15 januari 2018, 15:11:42
door Underlyingglitch
3th party packages

Gestart door B3rtBoard Synology Router

Reacties: 5
Gelezen: 2936
Laatste bericht 21 december 2015, 14:57:02
door Pippin
DS 5.0-4458 op DS114 updates packages lukt niet

Gestart door compleetBoard Synology DSM 5.1 en eerder

Reacties: 0
Gelezen: 1502
Laatste bericht 29 maart 2014, 08:57:38
door compleet