mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
etherpad lite path are now dinamyc (multi-instance) + some fixes
This commit is contained in:
parent
94770cec4f
commit
4239867e2f
4 changed files with 8 additions and 7 deletions
|
@ -11,13 +11,13 @@
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
|
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
|
||||||
LOGFILE="/var/log/etherpad-lite/etherpad-lite.log"
|
LOGFILE="/var/log/APPTOCHANGE/APPTOCHANGE.log"
|
||||||
EPLITE_DIR="/var/www/etherpadlite"
|
EPLITE_DIR="/var/www/APPTOCHANGE"
|
||||||
EPLITE_BIN="bin/safeRun.sh"
|
EPLITE_BIN="bin/safeRun.sh"
|
||||||
USER="www-data"
|
USER="www-data"
|
||||||
GROUP="www-data"
|
GROUP="www-data"
|
||||||
DESC="Etherpad Lite"
|
DESC="Etherpad Lite"
|
||||||
NAME="etherpad-lite"
|
NAME="APPTOCHANGE"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ set -e
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
echo "Starting $DESC... "
|
echo "Starting $DESC... "
|
||||||
|
|
||||||
start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
|
start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
|
||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
status() {
|
status() {
|
||||||
status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
|
status_of_proc -p /var/run/$NAME.pid "" "APPTOCHANGE" && exit 0 || exit $?
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
/* Users for basic authentication. is_admin = true gives access to /admin.
|
/* Users for basic authentication. is_admin = true gives access to /admin.
|
||||||
If you do not uncomment this, /admin will not be available! */
|
If you do not uncomment this, /admin will not be available! */
|
||||||
/*
|
/*
|
||||||
|
TODO add argument to ask ynh user admin, and change that here
|
||||||
"users": {
|
"users": {
|
||||||
"admin": {
|
"admin": {
|
||||||
"password": "changeme1",
|
"password": "changeme1",
|
||||||
|
|
|
@ -50,8 +50,8 @@ sudo mkdir -p $final_path
|
||||||
sudo cp -a ../sources/* $final_path
|
sudo cp -a ../sources/* $final_path
|
||||||
sudo cp ../conf/settings.json $final_path
|
sudo cp ../conf/settings.json $final_path
|
||||||
|
|
||||||
#TODO one service per instance ?
|
|
||||||
sudo cp ../conf/etherpad-lite /etc/init.d/$app
|
sudo cp ../conf/etherpad-lite /etc/init.d/$app
|
||||||
|
sudo sed -i "s/APPTOCHANGE/$app/g" /etc/init.d/$app
|
||||||
sudo chmod +x /etc/init.d/$app
|
sudo chmod +x /etc/init.d/$app
|
||||||
sudo update-rc.d $app defaults
|
sudo update-rc.d $app defaults
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ dbname=$(ynh_app_setting_get "$app" dbname)
|
||||||
|
|
||||||
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
||||||
|
|
||||||
mysql -u root -p$root_pwd -e "DROP DATABASE $dbname ; DROP USER $dbuser@localhost ;"
|
mysql -u root -p $root_pwd -e "DROP DATABASE $dbname ; DROP USER $dbuser@localhost ;"
|
||||||
sudo rm -rf /var/www/$app
|
sudo rm -rf /var/www/$app
|
||||||
|
|
||||||
rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue