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

Add checkprocess

This commit is contained in:
Josué Tille 2018-02-07 23:49:32 +01:00
parent 6bc53fd637
commit d0390934bd
6 changed files with 48 additions and 10 deletions

38
check_process Normal file
View file

@ -0,0 +1,38 @@
;; General
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
admin="john" (USER)
is_public=1 (PUBLIC|public=1|private=0)
; Checks
pkg_linter=1
setup_sub_dir=1
setup_root=1
setup_nourl=0
setup_private=1
setup_public=1
upgrade=1
# upgrade=1 from_commit=a62bce7dbc6bc0e1f1b4e872286ff124747ea009
# upgrade=1 from_commit=f050f88fbfe7bad1bf74d4584ec62ffcf28248e7
backup_restore=1
multi_instance=1
incorrect_path=0
port_already_use=1 (8448)
change_url=0
;;; Levels
Level 1=auto
Level 2=auto
Level 3=auto
# https://github.com/YunoHost-Apps/gogs_ynh/blob/master/conf/login_source.sql
Level 4=1
Level 5=auto
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0
;;; Upgrade options
# ; commit=a62bce7dbc6bc0e1f1b4e872286ff124747ea009
# name=Before multi_instance
# ; commit=f050f88fbfe7bad1bf74d4584ec62ffcf28248e7
# name=Old version package

View file

@ -53,7 +53,7 @@
"example": "johndoe" "example": "johndoe"
}, },
{ {
"name": "public_site", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": { "ask": {
"en": "Is it a public site ?", "en": "Is it a public site ?",

View file

@ -5,8 +5,9 @@ app=$YNH_APP_INSTANCE_NAME
final_path="/opt/$app" final_path="/opt/$app"
dbname=$app dbname=$app
dbuser=$app dbuser=$app
REPO_PATH="/home/$app/repositories" DATADIR="/home/$app"
DATA_PATH="/home/$app/data" REPO_PATH="$DATADIR/repositories"
DATA_PATH="$DATADIR/data"
# Detect the system architecture to download the right tarball # Detect the system architecture to download the right tarball
# NOTE: `uname -m` is more accurate and universal than `arch` # NOTE: `uname -m` is more accurate and universal than `arch`

View file

@ -7,17 +7,16 @@ source /usr/share/yunohost/helpers
ynh_abort_if_errors ynh_abort_if_errors
# Load common variables and helpers # Load common variables and helpers
source ./experimental_helper.sh source ../settings/scripts/experimental_helper.sh
source ./_common.sh source ../settings/scripts/_common.sh
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)
# Copy the app source files # Copy the app source files
ynh_backup "$DESTDIR" ynh_backup "$final_path"
# Copy the data files # Copy the data files
DATADIR="/home/$app"
ynh_backup "$DATADIR" ynh_backup "$DATADIR"
# Copy the conf files # Copy the conf files

View file

@ -14,7 +14,7 @@ source ./_common.sh
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_PUBLIC_SITE is_public=$YNH_APP_ARG_IS_PUBLIC
# Check domain/path availability # Check domain/path availability
ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain." ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain."

View file

@ -7,8 +7,8 @@ source /usr/share/yunohost/helpers
ynh_abort_if_errors ynh_abort_if_errors
# Load common variables and helpers # Load common variables and helpers
source ./experimental_helper.sh source ../settings/scripts/experimental_helper.sh
source ./_common.sh source ../settings/scripts/_common.sh
# Set app specific variables # Set app specific variables
app=${APPNAME:-gogs} app=${APPNAME:-gogs}