007revad / Synology_app_mover

Easily move Synology packages from 1 volume to another volume
MIT License
177 stars 15 forks source link

After updating it doesn't wanna stop app. #44

Closed Rasmusho12 closed 3 months ago

Rasmusho12 commented 3 months ago

After updating from 3.0.41 to 3.0.45 it doesn't want to stop the app. It fails to do so, however when checking directly on the synology, the app has stopped. image

After downgrading there is no problem at all image

007revad commented 3 months ago

With DSN Server running what does the following command return?

sudo /usr/syno/bin/synopkg status DNSServer; echo $?

And the same command when DSN Server is stopped?

And for a package that is not installed:

sudo /usr/syno/bin/synopkg status foobar; echo $?
dakky commented 3 months ago

have the same issue: the problem is here:

RUNNING_

root@hive /volume1/scripts/Synology_app_mover-3.0.45 $ /usr/syno/bin/synopkg status MailServer; echo $?
{"aspect":{"active":{"status":"running","status_code":0,"status_description":"retrieve from status script"}},"description":"Status: [0], package is started","package":"MailServer","status":"running"}
0

STOPPED:

root@hive /volume1/scripts/Synology_app_mover-3.0.45 $ /usr/syno/bin/synopkg status MailServer; echo $?
{"aspect":{"active":{"status":"stop","status_description":"translate from systemd status"}},"description":"Status: [0], package is stopped","package":"MailServer","status":"stop"}
0

the return code is always 0

DSM Version: DSM 7.1.1-42962 Update 6

dakky commented 3 months ago

Probably better:

root@hive /volume1/scripts/Synology_app_mover-3.0.45 $ /usr/syno/bin/synopkg is_onoff MailServer; echo $?
package MailServer isn't turned on, status: [262]
1
root@hive /volume1/scripts/Synology_app_mover-3.0.45 $ /usr/syno/bin/synopkg is_onoff MailServer; echo $?
package MailServer is turned on
0
007revad commented 3 months ago

@dakky @Rasmusho12

I've released a new version that fixes this issue. https://github.com/007revad/Synology_app_mover/releases/tag/v3.0.46