Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2c782808ed | ||
|
ba8af23f42 | ||
|
c5da839c5b | ||
a575bcbf46 | |||
|
06658b59d3 | ||
2f914cf8d9 |
@@ -111,8 +111,6 @@ create_htpasswd_file() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install -m 664 -g 65534 /dev/null
|
|
||||||
|
|
||||||
deploy_additionals() {
|
deploy_additionals() {
|
||||||
|
|
||||||
local DIR="$1"
|
local DIR="$1"
|
||||||
@@ -805,12 +803,13 @@ execute_task() {
|
|||||||
for APP in $APPS; do
|
for APP in $APPS; do
|
||||||
APP_NAME=$(echo "$APP" | jq -r '.name')
|
APP_NAME=$(echo "$APP" | jq -r '.name')
|
||||||
APP_VERSION=$(echo "$APP" | jq -r '.version')
|
APP_VERSION=$(echo "$APP" | jq -r '.version')
|
||||||
|
APP_ICON=$(echo "$APP" | jq -r '.icon')
|
||||||
if [ "$DEPLOYMENTS" != "" ]; then
|
if [ "$DEPLOYMENTS" != "" ]; then
|
||||||
SEP=","
|
SEP=","
|
||||||
else
|
else
|
||||||
SEP=""
|
SEP=""
|
||||||
fi
|
fi
|
||||||
DEPLOYMENTS=$DEPLOYMENTS$SEP'"'$APP_NAME'": "'$APP_VERSION'"'
|
DEPLOYMENTS=$DEPLOYMENTS$SEP'"'$APP_NAME'": {"version": "'$APP_VERSION'", "icon": "'$APP_ICON'"}'
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
if [ "$DEPLOYMENTS" == "" ]; then
|
if [ "$DEPLOYMENTS" == "" ]; then
|
||||||
@@ -900,6 +899,18 @@ execute_task() {
|
|||||||
DEPLOY_PAYLOAD=$(echo "$JSON" | jq -r .PAYLOAD) # base64 list of key-value pairs in JSON
|
DEPLOY_PAYLOAD=$(echo "$JSON" | jq -r .PAYLOAD) # base64 list of key-value pairs in JSON
|
||||||
deploy_additionals "$APP_DIR" "$DEPLOY_NAME" "$DEPLOY_PAYLOAD"
|
deploy_additionals "$APP_DIR" "$DEPLOY_NAME" "$DEPLOY_PAYLOAD"
|
||||||
sh /scripts/check_pid.sh "$PID" "$SHARED" "deploy-$DEPLOY_NAME" "$DATE" "$DEBUG" &
|
sh /scripts/check_pid.sh "$PID" "$SHARED" "deploy-$DEPLOY_NAME" "$DATE" "$DEBUG" &
|
||||||
|
|
||||||
|
elif [ "$DEPLOY_ACTION" == "edit" ]; then
|
||||||
|
|
||||||
|
DEPLOY_PAYLOAD=$(echo "$JSON" | jq -r .PAYLOAD) # base64 list of key-value pairs in JSON
|
||||||
|
|
||||||
|
# stop service before edit
|
||||||
|
debug "$service_exec service-$DEPLOY_NAME.json stop force"
|
||||||
|
$service_exec service-$DEPLOY_NAME.json stop force
|
||||||
|
|
||||||
|
deploy_additionals "$APP_DIR" "$DEPLOY_NAME" "$DEPLOY_PAYLOAD"
|
||||||
|
sh /scripts/check_pid.sh "$PID" "$SHARED" "deploy-$DEPLOY_NAME" "$DATE" "$DEBUG" &
|
||||||
|
|
||||||
elif [ "$DEPLOY_ACTION" == "uninstall" ]; then
|
elif [ "$DEPLOY_ACTION" == "uninstall" ]; then
|
||||||
remove_additionals "$APP_DIR" "$DEPLOY_NAME"
|
remove_additionals "$APP_DIR" "$DEPLOY_NAME"
|
||||||
# uninstall has finished
|
# uninstall has finished
|
||||||
|
Reference in New Issue
Block a user