1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/haste_ynh.git synced 2024-09-03 20:36:28 +02:00
haste_ynh/scripts/install

29 lines
687 B
Text
Raw Normal View History

2016-10-25 00:00:01 +02:00
#!/bin/bash
# Exit on command errors and treat unset variables as an error
set -eu
# Load common variables and functions
source ./_common.sh
2016-10-25 00:00:01 +02:00
# Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN
path=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
# Check domain/path availability
sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|| ynh_die "Path not available: ${domain}${path}"
# Save app settings
ynh_app_setting_set "$app" is_public "$is_public"
2016-10-25 00:00:01 +02:00
# Install the app
install_haste $domain $path $is_public
2016-10-25 00:00:01 +02:00
# Start Haste
sudo systemctl start "$app".service
# Add Haste to YunoHost's monitored services
sudo yunohost service add "$app" --log /var/log/"$app"/"$app".log