支持一键打包spk
This commit is contained in:
7
source/gofrpc/scripts/postinst
Executable file
7
source/gofrpc/scripts/postinst
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is run after the package files are transferred to @appstore.
|
||||
# You can change the file permission and ownership in this script.
|
||||
|
||||
|
||||
exit 0
|
6
source/gofrpc/scripts/postuninst
Executable file
6
source/gofrpc/scripts/postuninst
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is run after the package is removed from the system
|
||||
|
||||
|
||||
exit 0
|
7
source/gofrpc/scripts/postupgrade
Executable file
7
source/gofrpc/scripts/postupgrade
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Package Center will call this script after installing the new version of your package.
|
||||
|
||||
|
||||
exit 0
|
||||
|
7
source/gofrpc/scripts/preinst
Executable file
7
source/gofrpc/scripts/preinst
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is run before the package files are transferred to @appstore.
|
||||
# You can check if the installation requirements meet the DSM or package version, or if some services are enabled in this script.
|
||||
|
||||
|
||||
exit 0
|
5
source/gofrpc/scripts/preuninst
Executable file
5
source/gofrpc/scripts/preuninst
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is run before the package is removed.
|
||||
|
||||
exit 0
|
6
source/gofrpc/scripts/preupgrade
Executable file
6
source/gofrpc/scripts/preupgrade
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Package Center will call this script before uninstalling the old version of your package
|
||||
|
||||
exit 0
|
||||
|
30
source/gofrpc/scripts/start-stop-status
Executable file
30
source/gofrpc/scripts/start-stop-status
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is used to start and stop a package, detect running status, and generate the log file.
|
||||
# Parameters used by the script are listed in below: start, stop, status
|
||||
|
||||
PRIVATE_LOCATION="/var/packages/${SYNOPKG_PKGNAME}/target"
|
||||
START_FILE="./start.sh"
|
||||
STOP_FILE="./stop.sh"
|
||||
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
cd ${PRIVATE_LOCATION}
|
||||
/bin/sh ${START_FILE}
|
||||
;;
|
||||
stop)
|
||||
cd ${PRIVATE_LOCATION}
|
||||
(/bin/sh ${STOP_FILE} &)
|
||||
;;
|
||||
status)
|
||||
cd ${PRIVATE_LOCATION}
|
||||
ret=$(ps -ef | grep frpc | grep -v 'grep')
|
||||
if [ -n "${ret}" ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user