mirror of
https://github.com/YunoHost-Apps/elasticsearch7_ynh.git
synced 2024-09-03 18:26:25 +02:00
Handle pid directory through systemd
This commit is contained in:
parent
4e64a836f0
commit
d3fcd65dac
4 changed files with 1 additions and 25 deletions
|
@ -7,6 +7,7 @@ After=network.target
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
|
RuntimeDirectory=__APP__
|
||||||
Environment="ES_JAVA_HOME=__FINALPATH__/jdk"
|
Environment="ES_JAVA_HOME=__FINALPATH__/jdk"
|
||||||
Environment="ES_PATH_CONF=__FINALPATH__/config"
|
Environment="ES_PATH_CONF=__FINALPATH__/config"
|
||||||
Environment="PID_DIR=/run/__APP__"
|
Environment="PID_DIR=/run/__APP__"
|
||||||
|
|
|
@ -87,15 +87,6 @@ chmod -R o-rwx "$datadir"
|
||||||
chown -R $app:www-data "$datadir"
|
chown -R $app:www-data "$datadir"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE PID DIRECTORY
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
mkdir -p "/run/$app"
|
|
||||||
|
|
||||||
chmod 700 "/run/$app"
|
|
||||||
chown $app:$app "/run/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD CONFIGURATIONS
|
# ADD CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -68,13 +68,6 @@ then
|
||||||
ynh_secure_remove --file="$datadir"
|
ynh_secure_remove --file="$datadir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE PID DIR
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_script_progression --message="Removing pid directory..." --weight=1
|
|
||||||
ynh_secure_remove --file="/run/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CLOSE A PORT
|
# CLOSE A PORT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -74,15 +74,6 @@ chmod 750 "$datadir"
|
||||||
chmod -R o-rwx "$datadir"
|
chmod -R o-rwx "$datadir"
|
||||||
chown -R $app:www-data "$datadir"
|
chown -R $app:www-data "$datadir"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE PID DIRECTORY
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
mkdir -p "/run/$app"
|
|
||||||
|
|
||||||
chmod 700 "/run/$app"
|
|
||||||
chown $app:$app "/run/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue