mirror of
https://github.com/YunoHost-Apps/owntracks_ynh.git
synced 2024-09-03 19:56:24 +02:00
cleaning
This commit is contained in:
parent
0130e4c5ff
commit
6892774dd4
9 changed files with 2 additions and 150 deletions
|
@ -1,25 +0,0 @@
|
||||||
;; Test complet
|
|
||||||
; Manifest
|
|
||||||
domain="domain.tld"
|
|
||||||
path="/path"
|
|
||||||
user="package_checker"
|
|
||||||
is_public=1
|
|
||||||
; 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=f86e97b3bf963a15af911f78a9333bdee0b0f41d
|
|
||||||
backup_restore=1
|
|
||||||
multi_instance=1
|
|
||||||
change_url=1
|
|
||||||
;;; Options
|
|
||||||
Email=
|
|
||||||
Notification=none
|
|
||||||
;;; Upgrade options
|
|
||||||
; commit=f86e97b3bf963a15af911f78a9333bdee0b0f41d
|
|
||||||
name=Update check_process
|
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&user=package_checker&is_public=1&
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$_config['sql_host'] = 'localhost';
|
|
||||||
$_config['sql_user'] = '__DB_USER__';
|
|
||||||
$_config['sql_pass'] = '__DB_PWD__';
|
|
||||||
$_config['sql_db'] = '__DB_NAME__';
|
|
||||||
|
|
||||||
$_config['sql_prefix'] = '';
|
|
||||||
|
|
||||||
$_config['default_accuracy'] = 1000;
|
|
||||||
|
|
||||||
// The following function free us from requiring mysqlnd
|
|
||||||
function get_result($Statement)
|
|
||||||
{
|
|
||||||
$RESULT = array();
|
|
||||||
$Statement->store_result();
|
|
||||||
for ($i = 0; $i < $Statement->num_rows; $i++) {
|
|
||||||
$Metadata = $Statement->result_metadata();
|
|
||||||
$PARAMS = array();
|
|
||||||
while ($Field = $Metadata->fetch_field()) {
|
|
||||||
$PARAMS[] = &$RESULT[ $i ][ $Field->name ];
|
|
||||||
}
|
|
||||||
call_user_func_array(array( $Statement, 'bind_result' ), $PARAMS);
|
|
||||||
$Statement->fetch();
|
|
||||||
}
|
|
||||||
return $RESULT;
|
|
||||||
}
|
|
|
@ -1,19 +1 @@
|
||||||
## Features
|
Keep track of your location history
|
||||||
|
|
||||||
- [OwnTracks features for a HTTP API](http://owntracks.org/booklet/tech/http/), limited to the [features implemented by the PHP recorder](https://github.com/tomyvi/php-owntracks-recorder#features). Notably, no Friends feature. The [upstream PHP recorder has been tweaked](https://github.com/tituspijean/php-owntracks-recorder) to remove a cumbersome PHP dependency.
|
|
||||||
- Multi-user: each YunoHost user can connect though basic HTTP authentication, and has only access to their data.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
- Install the app on your YunoHost server
|
|
||||||
- Install the mobile app on your device, see [OwnTracks website](http://owntracks.org)
|
|
||||||
- Configure your mobile app:
|
|
||||||
- Allow it to access your location
|
|
||||||
- Preference > Connection
|
|
||||||
- Mode: `Private http`
|
|
||||||
- Host: `https://DOMAIN/PATH/record.php`
|
|
||||||
- Identification
|
|
||||||
- Authentication: `enabled`
|
|
||||||
- Username/password: your YNH credentials
|
|
||||||
- Device ID: as you wish
|
|
||||||
- Refer to the [OwnTracks documentation](http://owntracks.org/booklet) for the other settings
|
|
|
@ -1,19 +1 @@
|
||||||
## Caractéristiques
|
Gérez votre historique de géolocalisation
|
||||||
|
|
||||||
- [Fonctionnalités d'OwnTracks pour une API HTTP](http://owntracks.org/booklet/tech/http/), limité aux [fonctionnalités implémentées par l'enregistreur PHP](https://github.com/tomyvi/php-owntracks-recorder#features). Notamment, pas de fonction Amis. L'[enregistreur PHP en amont a été modifié](https://github.com/tituspijean/php-owntracks-recorder) pour supprimer une dépendance PHP encombrante.
|
|
||||||
- Multi-utilisateur : chaque utilisateur YunoHost peut se connecter via l'authentification HTTP de base, et n'a accès qu'à ses données.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
- Installez l'application sur votre serveur YunoHost
|
|
||||||
- Installez l'application mobile sur votre appareil, consultez le [site Web d'OwnTracks](http://owntracks.org)
|
|
||||||
- Configurez votre application mobile :
|
|
||||||
- Autorisez-le à accéder à votre emplacement
|
|
||||||
- Préférence > Connexion
|
|
||||||
- Mode : `http privé`
|
|
||||||
- Hébergeur : `https://DOMAIN/PATH/record.php`
|
|
||||||
- Identification
|
|
||||||
- Authentification: `enabled`
|
|
||||||
- Nom d'utilisateur/mot de passe : vos identifiants YNH
|
|
||||||
- ID de l'appareil : comme vous le souhaitez
|
|
||||||
- Reportez-vous à la [documentation d'OwnTracks](http://owntracks.org/booklet) pour les autres paramètres
|
|
|
@ -27,19 +27,6 @@ ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP THE PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP THE MYSQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
ynh_print_info --message="Backing up the MySQL database..."
|
|
||||||
|
|
||||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -36,28 +36,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
|
||||||
#ynh_add_fpm_config
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC SETUP
|
|
||||||
#=================================================
|
|
||||||
# PREPARE MYQSL DATABASE
|
|
||||||
#=================================================
|
|
||||||
#ynh_script_progression --message="Initializing the database..."
|
|
||||||
|
|
||||||
#ynh_mysql_connect_as $app $db_pwd $db_name < "$install_dir/sql/schema.sql"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# MODIFY A CONFIG FILE
|
|
||||||
#=================================================
|
|
||||||
#ynh_script_progression --message="Adding a configuration file..."
|
|
||||||
|
|
||||||
#ynh_add_config --template="../conf/config.inc.php" --destination="$install_dir/config.inc.php"
|
|
||||||
|
|
||||||
#chmod 400 "$install_dir/config.inc.php"
|
|
||||||
#chown $app:$app "$install_dir/config.inc.php"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL THE LOUNGE
|
# INSTALL THE LOUNGE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -67,7 +45,6 @@ pushd $install_dir
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install
|
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install
|
||||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build
|
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build
|
||||||
#mv $install_dir/dist/ $install_dir/
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -17,9 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
|
||||||
# Remove the dedicated nginx config
|
# Remove the dedicated nginx config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
# Remove the dedicated php-fpm config
|
|
||||||
ynh_remove_fpm_config
|
|
||||||
|
|
||||||
# Remove NodeJS
|
# Remove NodeJS
|
||||||
ynh_remove_nodejs
|
ynh_remove_nodejs
|
||||||
|
|
||||||
|
|
|
@ -20,19 +20,10 @@ ynh_restore_file --origin_path="$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE MYSQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
#ynh_script_progression --message="Restoring the MySQL database..."
|
|
||||||
|
|
||||||
#ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -42,7 +33,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
|
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
|
||||||
|
|
||||||
#ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -40,17 +40,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
|
||||||
ynh_add_fpm_config
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC UPGRADE
|
|
||||||
#=================================================
|
|
||||||
# MODIFY A CONFIG FILE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_add_config --template="../conf/config.inc.php" --destination="$install_dir/config.inc.php"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue