mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
Add movim daemon port choice
This commit is contained in:
parent
38a00c31cb
commit
5a640e0c9e
7 changed files with 20 additions and 5 deletions
|
@ -3,4 +3,9 @@ Movim for Yunohost.
|
|||
|
||||
Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol.
|
||||
|
||||
PACKAGE NOT READY YET
|
||||
DO NOT USE
|
||||
|
||||
**Changelog**
|
||||
|
||||
Current Movim version : 20150731.
|
||||
|
|
1
TODO
1
TODO
|
@ -1,4 +1,3 @@
|
|||
- SSO / no SSO distinction
|
||||
- Change port ?
|
||||
- SHA password
|
||||
- URL rewriting
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
### END INIT INFO
|
||||
|
||||
dir="YHDIR"
|
||||
cmd="php daemon.php https://YHURL 8080"
|
||||
cmd="php daemon.php https://YHURL YHPORT"
|
||||
user="www-data"
|
||||
|
||||
name=`basename $0`
|
||||
|
|
|
@ -5,7 +5,7 @@ After=nginx.service network.target local-fs.target
|
|||
[Service]
|
||||
User=www-data
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/php daemon.php https://YHURL 8080
|
||||
ExecStart=/usr/bin/php daemon.php https://YHURL YHPORT
|
||||
WorkingDirectory=YHDIR
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -19,7 +19,7 @@ location PATHTOCHANGE {
|
|||
}
|
||||
|
||||
location ~ ^PATHTOCHANGE/ws/ {
|
||||
proxy_pass http://localhost:8080;
|
||||
proxy_pass http://localhost:YHPORT;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
|
|
@ -66,7 +66,15 @@
|
|||
},
|
||||
"choices": ["Yes", "No"],
|
||||
"default": "No"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "port",
|
||||
"ask": {
|
||||
"en": "Movim daemon port ? (internal only)",
|
||||
"fr": "Port privé pour Movim ? (interne uniquement)"
|
||||
},
|
||||
"example": "9537"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ admin=$3
|
|||
password=$4
|
||||
language=$5
|
||||
public_site=$6
|
||||
port=$7
|
||||
|
||||
# Check domain/path availability
|
||||
sudo yunohost app checkurl $domain$path -a movim
|
||||
|
@ -58,6 +59,7 @@ sudo yunohost app addaccess movim -u $admin
|
|||
# Copy init script or systemd service
|
||||
sudo sed -i "s@YHURL@$domain$path@g" ../conf/movim.{service,init}
|
||||
sudo sed -i "s@YHDIR@$final_path@g" ../conf/movim.{service,init}
|
||||
sudo sed -i "s@YHPORT@$port@g" ../conf/movim.{service,init}
|
||||
if [ `pgrep -ox systemd` = "1" ];
|
||||
then
|
||||
sudo cp ../conf/movim.service /lib/systemd/system/
|
||||
|
@ -73,6 +75,7 @@ fi
|
|||
# Nginx configuration
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
|
||||
sed -i "s@YHPORT@$port@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/movim.conf
|
||||
|
||||
# SSOwat Configuration
|
||||
|
|
Loading…
Add table
Reference in a new issue