mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
commit
3bbfd1dbeb
24 changed files with 82 additions and 90 deletions
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/ldap"
|
backup_dir="$1/ldap"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/ssh"
|
backup_dir="$1/ssh"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/mysql"
|
backup_dir="$1/mysql"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/ssowat"
|
backup_dir="$1/ssowat"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/home"
|
backup_dir="$1/home"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/yunohost"
|
backup_dir="$1/yunohost"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/mail"
|
backup_dir="$1/mail"
|
||||||
|
|
||||||
sudo cp -a /var/mail/. $backup_dir
|
sudo cp -a /var/mail/. $backup_dir
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/xmpp"
|
backup_dir="$1/xmpp"
|
||||||
mkdir -p $backup_dir/{etc,var}
|
mkdir -p $backup_dir/{etc,var}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/nginx"
|
backup_dir="$1/nginx"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/cron"
|
backup_dir="$1/cron"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/ldap"
|
backup_dir="$1/ldap"
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/ssh"
|
backup_dir="$1/ssh"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/. /etc/ssh
|
sudo cp -a $backup_dir/. /etc/ssh
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/mysql"
|
backup_dir="$1/mysql"
|
||||||
|
|
||||||
mysqlpwd=$(sudo cat /etc/yunohost/mysql)
|
mysqlpwd=$(sudo cat /etc/yunohost/mysql)
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/ssowat"
|
backup_dir="$1/ssowat"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/. /etc/ssowat
|
sudo cp -a $backup_dir/. /etc/ssowat
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/home"
|
backup_dir="$1/home"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/. /home
|
sudo cp -a $backup_dir/. /home
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/yunohost"
|
backup_dir="$1/yunohost"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/. /etc/yunohost
|
sudo cp -a $backup_dir/. /etc/yunohost
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/mail"
|
backup_dir="$1/mail"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/. /var/mail
|
sudo cp -a $backup_dir/. /var/mail
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/xmpp"
|
backup_dir="$1/xmpp"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/etc/. /etc/metronome
|
sudo cp -a $backup_dir/etc/. /etc/metronome
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/nginx"
|
backup_dir="$1/nginx"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/. /etc/nginx/conf.d
|
sudo cp -a $backup_dir/. /etc/nginx/conf.d
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
backup_dir="$1/cron"
|
backup_dir="$1/cron"
|
||||||
|
|
||||||
sudo cp -a $backup_dir/. /etc/cron.d
|
sudo cp -a $backup_dir/. /etc/cron.d
|
||||||
|
|
32
debian/postinst
vendored
32
debian/postinst
vendored
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
TMP=/usr/share/yunohost/yunohost-config/moulinette
|
TMP=/usr/share/yunohost/yunohost-config/moulinette
|
||||||
|
|
||||||
if [ ! -d /etc/yunohost ];
|
if [ ! -d /etc/yunohost ];
|
||||||
|
@ -41,9 +44,12 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /var/cache/moulinette/*
|
rm -rf /var/cache/moulinette/*
|
||||||
update-rc.d yunohost-api defaults
|
update-rc.d yunohost-api defaults > /dev/null
|
||||||
service yunohost-api restart
|
service yunohost-api restart
|
||||||
|
|
||||||
|
# Firewall
|
||||||
|
update-rc.d yunohost-firewall defaults > /dev/null
|
||||||
|
|
||||||
# Reload SSOwat conf if obsolete
|
# Reload SSOwat conf if obsolete
|
||||||
if [ -f /etc/yunohost/installed ];
|
if [ -f /etc/yunohost/installed ];
|
||||||
then
|
then
|
||||||
|
@ -54,3 +60,27 @@ then
|
||||||
fi
|
fi
|
||||||
yunohost app ssowatconf
|
yunohost app ssowatconf
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postinst> `configure' <most-recently-configured-version>
|
||||||
|
# * <old-postinst> `abort-upgrade' <new version>
|
||||||
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||||
|
# <new-version>
|
||||||
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||||
|
# <failed-install-package> <version> `removing'
|
||||||
|
# <conflicting-package> <version>
|
||||||
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
do_configure
|
||||||
|
;;
|
||||||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "postinst called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
5
debian/yunohost-api.init
vendored
5
debian/yunohost-api.init
vendored
|
@ -6,6 +6,7 @@
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: Start/stop YunoHost API
|
# Short-Description: Start/stop YunoHost API
|
||||||
|
# Description: Start/stop YunoHost API
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
DAEMON=/usr/bin/yunohost-api
|
DAEMON=/usr/bin/yunohost-api
|
||||||
|
@ -40,7 +41,7 @@ case "$1" in
|
||||||
kill `ps aux | grep 'yunohost-api' | grep -v grep | grep -v stop | awk '{print $2}'` > /dev/null 2>&1
|
kill `ps aux | grep 'yunohost-api' | grep -v grep | grep -v stop | awk '{print $2}'` > /dev/null 2>&1
|
||||||
log_end_msg 0
|
log_end_msg 0
|
||||||
;;
|
;;
|
||||||
restart)
|
restart|force-reload)
|
||||||
logger "YunoHost API: Restarting"
|
logger "YunoHost API: Restarting"
|
||||||
log_daemon_msg "Restarting API: YunoHost"
|
log_daemon_msg "Restarting API: YunoHost"
|
||||||
if [ -f /var/run/yunohost-api.pid ]; then
|
if [ -f /var/run/yunohost-api.pid ]; then
|
||||||
|
@ -66,7 +67,7 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
logger "YunoHost API: Invalid usage"
|
logger "YunoHost API: Invalid usage"
|
||||||
echo "Usage: /etc/init.d/yunohost-api {start|stop|restart|status}" >&2
|
echo "Usage: /etc/init.d/yunohost-api {start|stop|restart|force-reload|status}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
5
debian/yunohost-firewall.init
vendored
5
debian/yunohost-firewall.init
vendored
|
@ -6,6 +6,7 @@
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: Start/stop YunoHost firewall
|
# Short-Description: Start/stop YunoHost firewall
|
||||||
|
# Description: Start/stop YunoHost firewall
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
DAEMON=/usr/bin/yunohost
|
DAEMON=/usr/bin/yunohost
|
||||||
|
@ -30,7 +31,7 @@ case "$1" in
|
||||||
/usr/bin/yunohost firewall stop
|
/usr/bin/yunohost firewall stop
|
||||||
log_end_msg $?
|
log_end_msg $?
|
||||||
;;
|
;;
|
||||||
restart)
|
restart|force-reload)
|
||||||
logger "YunoHost firewall: Restarting"
|
logger "YunoHost firewall: Restarting"
|
||||||
log_daemon_msg "Restarting firewall: YunoHost"
|
log_daemon_msg "Restarting firewall: YunoHost"
|
||||||
/usr/bin/yunohost firewall reload
|
/usr/bin/yunohost firewall reload
|
||||||
|
@ -44,7 +45,7 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
logger "YunoHost API: Invalid usage"
|
logger "YunoHost API: Invalid usage"
|
||||||
echo "Usage: /etc/init.d/yunohost-api {start|stop|restart|status}" >&2
|
echo "Usage: /etc/init.d/yunohost-api {start|stop|restart|force-reload|status}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
0
lib/yunohost/__init__.py
Executable file → Normal file
0
lib/yunohost/__init__.py
Executable file → Normal file
Loading…
Add table
Reference in a new issue