Init.d to systemctl

This commit is contained in:
Andrii Shvaika 2020-05-25 15:55:36 +03:00
parent 670a218e6d
commit 1fc12b3adb
8 changed files with 13 additions and 8 deletions

View File

@ -23,7 +23,7 @@ RUN chmod a+x /tmp/*.sh \
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}

View File

@ -23,7 +23,7 @@ RUN chmod a+x /tmp/*.sh \
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar

View File

@ -23,7 +23,7 @@ RUN chmod a+x /tmp/*.sh \
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar

View File

@ -23,7 +23,7 @@ RUN chmod a+x /tmp/*.sh \
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}.jar

View File

@ -23,7 +23,7 @@ RUN chmod a+x /tmp/*.sh \
RUN yes | dpkg -i /tmp/${pkg.name}.deb
RUN update-rc.d ${pkg.name} disable
RUN systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
RUN chmod 555 ${pkg.installFolder}/bin/${pkg.name}

View File

@ -174,7 +174,6 @@ buildDeb {
}
}
link("/etc/init.d/${pkgName}", "${pkgInstallFolder}/bin/${pkgName}.jar")
link("${pkgInstallFolder}/bin/${pkgName}.yml", "${pkgInstallFolder}/conf/${pkgName}.yml")
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
}

View File

@ -3,5 +3,6 @@
mkdir -m 0755 -p ${pkg.logFolder}
chown -R ${pkg.user}: ${pkg.logFolder}
chown -R ${pkg.user}: ${pkg.installFolder}
update-rc.d ${pkg.name} defaults
systemctl --no-reload enable ${pkg.name}.service >/dev/null 2>&1 || :

View File

@ -1,3 +1,8 @@
#!/bin/sh
update-rc.d -f ${pkg.name} remove
set -e
systemctl --no-reload disable --now ${pkg.name}.service > /dev/null 2>&1 || :
exit 0