mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
script fixes
This commit is contained in:
parent
252d0fd502
commit
652ce7a633
1 changed files with 19 additions and 15 deletions
|
@ -119,14 +119,16 @@ function main()
|
||||||
step clean_image || die "Unable to clean image"
|
step clean_image || die "Unable to clean image"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_raspbian ; then
|
|
||||||
# Reboot should be done before postinstall to be able to run iptables rules
|
|
||||||
reboot
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Installation logs are available in $YUNOHOST_LOG"
|
info "Installation logs are available in $YUNOHOST_LOG"
|
||||||
success "YunoHost installation completed !"
|
success "YunoHost installation completed !"
|
||||||
conclusion
|
conclusion
|
||||||
|
|
||||||
|
if is_raspbian ; then
|
||||||
|
# Reboot should be done before postinstall to be able to run iptables rules
|
||||||
|
info "Your server will now reboot. Please log back in as root and run the post-install."
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,11 +437,11 @@ function workarounds_because_sysadmin_sucks() {
|
||||||
# ######################## #
|
# ######################## #
|
||||||
# Workarounds for fail2ban #
|
# Workarounds for fail2ban #
|
||||||
# ######################## #
|
# ######################## #
|
||||||
|
|
||||||
# We need to create auth.log in case it does not exists, because in some situation,
|
# We need to create auth.log in case it does not exists, because in some situation,
|
||||||
# this file does not exists, fail2ban will miserably fail to start because
|
# this file does not exists, fail2ban will miserably fail to start because
|
||||||
# the default fail2ban jail include the sshd jail ... >.>
|
# the default fail2ban jail include the sshd jail ... >.>
|
||||||
touch /var/log/auth.log
|
touch /var/log/auth.log
|
||||||
|
|
||||||
# ######################## #
|
# ######################## #
|
||||||
# Workarounds for avahi #
|
# Workarounds for avahi #
|
||||||
|
@ -512,10 +514,12 @@ function install_yunohost_packages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function restart_services() {
|
function restart_services() {
|
||||||
service slapd restart
|
systemctl daemon-reload
|
||||||
# service yunohost-firewall start
|
|
||||||
service unscd restart
|
systemctl restart slapd
|
||||||
service nslcd restart
|
# systemctl restart yunohost-firewall
|
||||||
|
systemctl restart unscd
|
||||||
|
systemctl restart nslcd
|
||||||
|
|
||||||
# NOTE : We don't fail if slapd fails to restart...
|
# NOTE : We don't fail if slapd fails to restart...
|
||||||
return 0
|
return 0
|
||||||
|
@ -523,13 +527,13 @@ function restart_services() {
|
||||||
|
|
||||||
function fix_locales() {
|
function fix_locales() {
|
||||||
# This function tries to fix the whole locale and perl mess about missing locale files
|
# This function tries to fix the whole locale and perl mess about missing locale files
|
||||||
|
|
||||||
# Install 'locales' if locale-gen does not exists yet
|
# Install 'locales' if locale-gen does not exists yet
|
||||||
command -v locale-gen > /dev/null || apt_get_wrapper -o Dpkg::Options::="--force-confold" -y install locales
|
command -v locale-gen > /dev/null || apt_get_wrapper -o Dpkg::Options::="--force-confold" -y install locales
|
||||||
|
|
||||||
# Generate at least en_US.UTF-8
|
# Generate at least en_US.UTF-8
|
||||||
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
|
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
|
||||||
|
|
||||||
# If no /etc/environment exists, default to en_US.UTF-8
|
# If no /etc/environment exists, default to en_US.UTF-8
|
||||||
[ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
|
[ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment
|
||||||
source /etc/environment
|
source /etc/environment
|
||||||
|
|
Loading…
Add table
Reference in a new issue