mirror of
https://github.com/YunoHost-Apps/timemachine_ynh.git
synced 2024-09-03 20:26:33 +02:00
updated packaging
This commit is contained in:
parent
57dd378c28
commit
58869b0f4e
7 changed files with 22 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
Package to create a Time Machine Backup Source
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "App to setup the server as a Time Machine backup target",
|
"en": "App to setup the server as a Time Machine backup target",
|
||||||
"fr": "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)"
|
"fr": "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)"
|
||||||
},
|
},
|
||||||
"version": "1.0~ynh1",
|
"version": "1.0~ynh2",
|
||||||
"url": "https://example.com",
|
"url": "https://example.com",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "free",
|
"license": "free",
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"help": {
|
"help": {
|
||||||
"en": "User to whom the details will be sent",
|
"en": "User to whom the usage details will be sent",
|
||||||
"fr": ""
|
"fr": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,6 +25,15 @@ samba_sysadmin_update () {
|
||||||
ls /etc/smb/smb.d/* | sed -e 's/^/include = /' > /etc/smb/includes.conf
|
ls /etc/smb/smb.d/* | sed -e 's/^/include = /' > /etc/smb/includes.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
samba_sysadmin_add () {
|
||||||
|
if grep -R "include = /etc/sdmb/includes.conf" /etc/samba/smb.conf
|
||||||
|
then
|
||||||
|
echo "The includes.conf file is already present in your smb.conf file."
|
||||||
|
else
|
||||||
|
echo "include = /etc/smb/includes.conf" >> /etc/samba/smb.conf
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -112,6 +112,9 @@ ynh_add_config --template="../conf/avahi-samba.service" --destination="/etc/avah
|
||||||
# Update samba configuration
|
# Update samba configuration
|
||||||
samba_sysadmin_update
|
samba_sysadmin_update
|
||||||
|
|
||||||
|
# Check and Add
|
||||||
|
samba_sysadmin_add
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -61,6 +61,8 @@ ynh_script_progression --message="Removing various files..." --time --weight=1
|
||||||
ynh_secure_remove --file="/etc/smb/smb.d/$app.conf"
|
ynh_secure_remove --file="/etc/smb/smb.d/$app.conf"
|
||||||
ynh_secure_remove --file="/etc/avahi/services/$app.service"
|
ynh_secure_remove --file="/etc/avahi/services/$app.service"
|
||||||
|
|
||||||
|
samba_sysadmin_update
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -71,6 +73,7 @@ ynh_script_progression --message="Removing the dedicated system user..." --time
|
||||||
# Delete a system user
|
# Delete a system user
|
||||||
ynh_system_user_delete --username=$app
|
ynh_system_user_delete --username=$app
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -111,6 +111,7 @@ ynh_restore_file --origin_path="/etc/smb/smb.d/$app.conf"
|
||||||
ynh_restore_file --origin_path="/etc/avahi/services/$app.service"
|
ynh_restore_file --origin_path="/etc/avahi/services/$app.service"
|
||||||
|
|
||||||
samba_sysadmin_update
|
samba_sysadmin_update
|
||||||
|
samba_sysadmin_add
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -139,6 +139,9 @@ ynh_script_progression --message="Updating a configuration file..." --time --wei
|
||||||
ynh_add_config --template="../conf/smb.conf" --destination="/etc/smb/smb.d/$app.conf"
|
ynh_add_config --template="../conf/smb.conf" --destination="/etc/smb/smb.d/$app.conf"
|
||||||
ynh_add_config --template="../conf/avahi-samba.service" --destination="/etc/avahi/services/$app.service"
|
ynh_add_config --template="../conf/avahi-samba.service" --destination="/etc/avahi/services/$app.service"
|
||||||
|
|
||||||
|
samba_sysadmin_update
|
||||||
|
samba_sysadmin_add
|
||||||
|
|
||||||
# FIXME: this should be handled by the core in the future
|
# FIXME: this should be handled by the core in the future
|
||||||
# You may need to use chmod 600 instead of 400,
|
# You may need to use chmod 600 instead of 400,
|
||||||
# for example if the app is expected to be able to modify its own config
|
# for example if the app is expected to be able to modify its own config
|
||||||
|
|
Loading…
Add table
Reference in a new issue