Skip to content

Commit 7072103

Browse files
committed
remove existing 10-fix-permissions on pristine installs only
1 parent dbcbe3d commit 7072103

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

deb/debian/preinst

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ if [ "$1" = "install" ]; then
1313
exit 1
1414
fi
1515

16-
# remove the hb-service generated fix-permission pre-start script
17-
if [ -f /etc/hb-service/homebridge/prestart.d/10-fix-permissions ]; then
16+
# remove the hb-service generated fix-permission pre-start script (fresh install only!)
17+
if [ -z $2 ] && [ -f /etc/hb-service/homebridge/prestart.d/10-fix-permissions ]; then
1818
rm -rf /etc/hb-service/homebridge/prestart.d/10-fix-permissions
1919
fi
2020

2121
# check for existing homebridge.service
2222
if [ -f /etc/systemd/system/homebridge.service ]; then
23-
2423
# try and get a list of the installed plugins and create a temporary package.json that will be used to install them again in the new location
2524
if [ ! -f /var/lib/homebridge/package.json ] && [ -f /var/lib/homebridge/config.json ] && [ -f /var/lib/homebridge/.uix-secrets ]; then
2625
if systemctl is-active --quiet homebridge.service; then

0 commit comments

Comments
 (0)