mirror of
https://github.com/YunoHost-Apps/osjs_ynh.git
synced 2024-09-03 19:56:11 +02:00
[version] v3.0 alpha27
This commit is contained in:
parent
28b3b8ad6e
commit
d9aa632f0f
4 changed files with 16 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/os-js/OS.js/archive/v2.1.6.tar.gz
|
||||
SOURCE_SUM=8cac584aa5405b9b5190537dbbcb58c1627bfdcf9dc851b49ead98cab793cf21
|
||||
SOURCE_URL=https://github.com/os-js/OS.js/archive/1380d4b98048dee2d7e95b9dddbf9af323f5fdab.tar.gz
|
||||
SOURCE_SUM=2cbfad95c59016a404bec35db0a4e7b6ebf4e6f782ee17745ca553fdbc23f1b4
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
ARCH_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -10,7 +10,7 @@ Group=__APP__
|
|||
WorkingDirectory=__FINALPATH__
|
||||
ExecStartPre=__NODEJS__
|
||||
Environment="PATH=__ENV_PATH__"
|
||||
ExecStart=__NODE__/node osjs run --hostname=0.0.0.0 --port=__PORT__ >> /var/log/__APP__/osjs.log
|
||||
ExecStart=__NODE__/npm run serve >> /var/log/__APP__/osjs.log
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#=================================================
|
||||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
node_version=8.11.1
|
||||
|
||||
node_version=8
|
||||
|
||||
#=================================================
|
||||
# BACKUP
|
||||
|
|
|
@ -55,7 +55,7 @@ ynh_app_setting_set $app is_public $is_public
|
|||
#=================================================
|
||||
|
||||
# Find a free port
|
||||
port=$(ynh_find_port 4000)
|
||||
port=$(ynh_find_port 8000)
|
||||
# Open this port
|
||||
yunohost firewall allow --no-upnp TCP $port 2>&1
|
||||
ynh_app_setting_set $app port $port
|
||||
|
@ -126,13 +126,18 @@ sudo chown admin -R $install_log
|
|||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
npm install >> $install_log 2>&1
|
||||
node osjs build
|
||||
NODE_ENV=production npm run build >> $install_log 2>&1
|
||||
npm run package:discover
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# Configure init script
|
||||
# Set right on directory and configure init script
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string "8000" "$port" "$final_path/src/server/config.js"
|
||||
chown $app:$app $final_path -R
|
||||
chmod 755 $final_path -R
|
||||
chown $app:$app /var/log/$app/$app.log
|
||||
systemctl daemon-reload
|
||||
systemctl enable "$app".service
|
||||
systemctl start "$app".service
|
||||
|
@ -148,13 +153,14 @@ ynh_use_logrotate
|
|||
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||
#=================================================
|
||||
|
||||
yunohost service add NAME_INIT.D --log "/var/log/FILE.log"
|
||||
yunohost service add $app --log "/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# Check if the service started
|
||||
#=================================================
|
||||
|
||||
ynh_check_starting "Running..." "/var/log/$app/osjs.log" "120"
|
||||
#ynh_check_starting "HTTP Listening at localhost:$port" "/var/log/$app/$app.log" "120"
|
||||
sleep 10
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
Loading…
Add table
Reference in a new issue