Tidying
This commit is contained in:
parent
e69438ccc7
commit
ce4afbf5a1
|
@ -100,7 +100,7 @@ function configure_firewall_for_babel {
|
|||
}
|
||||
|
||||
function install_babel {
|
||||
if grep -Fxq "install_babel" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed babel) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
if [[ $ENABLE_BABEL != "yes" ]]; then
|
||||
|
@ -115,7 +115,7 @@ function install_babel {
|
|||
|
||||
function_check configure_firewall_for_babel
|
||||
configure_firewall_for_babel
|
||||
echo 'install_babel' >> $COMPLETION_FILE
|
||||
install_completed babel
|
||||
}
|
||||
|
||||
# NOTE: deliberately there is no "exit 0"
|
||||
|
|
|
@ -135,7 +135,7 @@ function install_batman {
|
|||
mesh_install_batman
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_batman" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed batman) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
if [[ $ENABLE_BATMAN != "yes" ]]; then
|
||||
|
@ -162,7 +162,7 @@ function install_batman {
|
|||
|
||||
function_check configure_firewall_for_batman
|
||||
configure_firewall_for_batman
|
||||
echo 'install_batman' >> $COMPLETION_FILE
|
||||
install_completed batman
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -500,7 +500,7 @@ function install_blog {
|
|||
exit 5062
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_blog" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed blog) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -560,7 +560,7 @@ function install_blog {
|
|||
echo "Blog domain:$FULLBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
|
||||
fi
|
||||
|
||||
echo 'install_blog' >> $COMPLETION_FILE
|
||||
install_completed blog
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -305,7 +305,7 @@ function install_blogstatic {
|
|||
return
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_blogstatic" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed blogstatic) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -343,7 +343,7 @@ function install_blogstatic {
|
|||
chown -R $MY_USERNAME:$MY_USERNAME $STATIC_BLOG_INSTALL_DIR
|
||||
chown -R www-data:www-data $STATIC_BLOG_PATH
|
||||
|
||||
echo 'install_blogstatic' >> $COMPLETION_FILE
|
||||
install_completed blogstatic
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -533,12 +533,12 @@ function install_cjdns_tools {
|
|||
}
|
||||
|
||||
function install_cjdns {
|
||||
if grep -Fxq "install_cjdns" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed cjdns) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_cjdns_main
|
||||
install_cjdns_tools
|
||||
echo 'install_cjdns' >> $COMPLETION_FILE
|
||||
install_completed cjdns
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -257,12 +257,12 @@ function script_for_attaching_usb_drive {
|
|||
}
|
||||
|
||||
function install_dlna {
|
||||
if grep -Fxq "install_dlna" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed dlna) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_dlna_main
|
||||
script_for_attaching_usb_drive
|
||||
echo 'install_dlna' >> $COMPLETION_FILE
|
||||
install_completed dlna
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -108,7 +108,7 @@ function remove_emacs {
|
|||
}
|
||||
|
||||
function install_emacs {
|
||||
if grep -Fxq "install_emacs" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed emacs) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
update-alternatives --set editor /usr/bin/emacs24
|
||||
|
@ -186,7 +186,7 @@ function install_emacs {
|
|||
cp /home/$MY_USERNAME/.emacs /root/.emacs
|
||||
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.emacs
|
||||
|
||||
echo 'install_emacs' >> $COMPLETION_FILE
|
||||
install_completed emacs
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -876,7 +876,7 @@ function install_gnusocial_plugin_nsfw {
|
|||
}
|
||||
|
||||
function install_gnusocial {
|
||||
if grep -Fxq "install_gnusocial" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed gnusocial) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_gnusocial_main
|
||||
|
@ -886,7 +886,7 @@ function install_gnusocial {
|
|||
install_gnusocial_plugin_sharings
|
||||
install_gnusocial_plugin_sharings_theme
|
||||
install_gnusocial_plugin_nsfw
|
||||
echo 'install_gnusocial' >> $COMPLETION_FILE
|
||||
install_completed gnusocial
|
||||
}
|
||||
|
||||
# NOTE: deliberately there is no "exit 0"
|
||||
|
|
|
@ -345,7 +345,7 @@ function install_gogs {
|
|||
return
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_gogs" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed gogs) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -666,7 +666,7 @@ function install_gogs {
|
|||
else
|
||||
sed -i "s|Gogs version.*|Gogs version:$GOGS_VERSION|g" $COMPLETION_FILE
|
||||
fi
|
||||
echo 'install_gogs' >> $COMPLETION_FILE
|
||||
install_completed gogs
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -310,7 +310,7 @@ function install_hubzilla {
|
|||
return
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_hubzilla" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed hubzilla) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -611,7 +611,7 @@ function install_hubzilla {
|
|||
${PROJECT_NAME}-addemail -u $MY_USERNAME -e "noreply@$HUBZILLA_DOMAIN_NAME" -g hubzilla --public no
|
||||
|
||||
echo "Hubzilla domain:${HUBZILLA_DOMAIN_NAME}" >> $COMPLETION_FILE
|
||||
echo 'install_hubzilla' >> $COMPLETION_FILE
|
||||
install_completed hubzilla
|
||||
}
|
||||
|
||||
# NOTE: deliberately there is no "exit 0"
|
||||
|
|
|
@ -288,7 +288,7 @@ function install_ipfs_js {
|
|||
mesh_install_ipfs_js
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_ipfs_js" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed ipfs_js) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -378,7 +378,7 @@ function install_ipfs_js {
|
|||
function_check configure_firewall_for_ipfs
|
||||
configure_firewall_for_ipfs
|
||||
|
||||
echo 'install_ipfs_js' >> $COMPLETION_FILE
|
||||
install_completed ipfs_js
|
||||
}
|
||||
|
||||
function mesh_install_ipfs_go {
|
||||
|
@ -455,7 +455,7 @@ function install_ipfs_go {
|
|||
mesh_install_ipfs_go
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_ipfs_go" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed ipfs_go) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -590,7 +590,7 @@ function install_ipfs_go {
|
|||
function_check configure_firewall_for_ipfs
|
||||
configure_firewall_for_ipfs
|
||||
|
||||
echo 'install_ipfs_go' >> $COMPLETION_FILE
|
||||
install_completed ipfs_go
|
||||
}
|
||||
|
||||
function install_ipfs {
|
||||
|
|
|
@ -381,12 +381,12 @@ function install_irc_client {
|
|||
}
|
||||
|
||||
function install_irc {
|
||||
if grep -Fxq "install_irc" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed irc) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_irc_server
|
||||
install_irc_client
|
||||
echo 'install_irc' >> $COMPLETION_FILE
|
||||
install_completed irc
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -231,7 +231,7 @@ function install_librevault {
|
|||
return
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_librevalut" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed librevault) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -327,7 +327,7 @@ function install_librevault {
|
|||
systemctl enable librevault-daemon
|
||||
systemctl start librevault-daemon
|
||||
|
||||
echo 'install_librevault' >> $COMPLETION_FILE
|
||||
install_completed librevault
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -115,7 +115,7 @@ function install_mediagoblin {
|
|||
chown -hR mediagoblin:www-data $MEDIAGOBLIN_WORKING_DIRECTORY
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_mediagoblin" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed mediagoblin) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -427,7 +427,7 @@ function install_mediagoblin {
|
|||
sed -i "s/Mediagoblin domain.*/Mediagoblin domain:$MEDIAGOBLIN_DOMAIN_NAME/g" $COMPLETION_FILE
|
||||
fi
|
||||
|
||||
echo 'install_mediagoblin' >> $COMPLETION_FILE
|
||||
install_completed mediagoblin
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -201,10 +201,7 @@ function configure_firewall_for_voip {
|
|||
}
|
||||
|
||||
function install_mumble {
|
||||
if grep -Fxq "install_mumble" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_voip" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed mumble) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
apt-get -y install mumble-server
|
||||
|
@ -297,7 +294,7 @@ function install_mumble {
|
|||
|
||||
function_check configure_firewall_for_voip
|
||||
configure_firewall_for_voip
|
||||
echo 'install_mumble' >> $COMPLETION_FILE
|
||||
install_completed mumble
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -621,13 +621,13 @@ function install_rss_mobile_reader {
|
|||
}
|
||||
|
||||
function install_rss {
|
||||
if grep -Fxq "install_rss" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed rss) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_rss_main
|
||||
install_rss_gnusocial
|
||||
install_rss_mobile_reader
|
||||
echo 'install_rss' >> $COMPLETION_FILE
|
||||
install_completed rss
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -122,7 +122,7 @@ function install_searx {
|
|||
exit 62429
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_searx" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed searx) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -298,7 +298,7 @@ function install_searx {
|
|||
chmod 600 /home/$MY_USERNAME/README
|
||||
fi
|
||||
|
||||
echo 'install_searx' >> $COMPLETION_FILE
|
||||
install_completed searx
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -449,12 +449,12 @@ function install_sip_turn {
|
|||
}
|
||||
|
||||
function install_sip {
|
||||
if grep -Fxq "install_sip" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed sip) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_sip_main
|
||||
update_sipwitch_daemon
|
||||
echo 'install_sip' >> $COMPLETION_FILE
|
||||
install_completed sip
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -470,7 +470,7 @@ function install_syncthing {
|
|||
return
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_syncthing" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed syncthing) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -508,7 +508,7 @@ function install_syncthing {
|
|||
|
||||
function_check configure_firewall_for_syncthing
|
||||
configure_firewall_for_syncthing
|
||||
echo 'install_syncthing' >> $COMPLETION_FILE
|
||||
install_completed syncthing
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -292,7 +292,7 @@ function install_tahoelafs {
|
|||
return
|
||||
fi
|
||||
|
||||
if grep -Fxq "install_tahoelafs" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed tahoelafs) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -358,7 +358,7 @@ function install_tahoelafs {
|
|||
systemctl daemon-reload
|
||||
systemctl start tahoelafs
|
||||
|
||||
echo 'install_tahoelafs' >> $COMPLETION_FILE
|
||||
install_completed tahoelafs
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -666,7 +666,7 @@ function enable_tox_repo {
|
|||
|
||||
function install_tox {
|
||||
if [ ! $INSTALLING_MESH ]; then
|
||||
if grep -Fxq "install_tox" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed tox) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
@ -683,7 +683,7 @@ function install_tox {
|
|||
install_tox_client
|
||||
fi
|
||||
|
||||
echo 'install_tox' >> $COMPLETION_FILE
|
||||
install_completed tox
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -68,7 +68,7 @@ function remove_vpn {
|
|||
}
|
||||
|
||||
function install_vpn {
|
||||
if grep -Fxq "install_vpn" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed vpn) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
if ! grep -q "repo.universe-factory.net" /etc/apt/sources.list; then
|
||||
|
@ -84,7 +84,7 @@ function install_vpn {
|
|||
exit 52026
|
||||
fi
|
||||
fi
|
||||
echo 'install_vpn' >> $COMPLETION_FILE
|
||||
install_completed vpn
|
||||
}
|
||||
|
||||
# NOTE: deliberately there is no "exit 0"
|
||||
|
|
|
@ -138,7 +138,7 @@ function remove_webmail {
|
|||
}
|
||||
|
||||
function install_webmail {
|
||||
if grep -Fxq "install_webmail" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed webmail) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ -d /etc/apache2 ]; then
|
||||
|
@ -261,7 +261,7 @@ function install_webmail {
|
|||
chmod 600 /home/$MY_USERNAME/README
|
||||
fi
|
||||
|
||||
echo 'install_webmail' >> $COMPLETION_FILE
|
||||
install_completed webmail
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -178,7 +178,7 @@ function get_wiki_admin_password {
|
|||
}
|
||||
|
||||
function install_wiki {
|
||||
if grep -Fxq "install_wiki" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed wiki) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
if [ ! $WIKI_DOMAIN_NAME ]; then
|
||||
|
@ -539,7 +539,7 @@ function install_wiki {
|
|||
fi
|
||||
|
||||
echo "Wiki domain:$WIKI_DOMAIN_NAME" >> $COMPLETION_FILE
|
||||
echo 'install_wiki' >> $COMPLETION_FILE
|
||||
install_completed wiki
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -502,12 +502,12 @@ function install_xmpp_client {
|
|||
}
|
||||
|
||||
function install_xmpp {
|
||||
if grep -Fxq "install_xmpp" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed xmpp) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_xmpp_main
|
||||
install_xmpp_client
|
||||
echo 'install_xmpp' >> $COMPLETION_FILE
|
||||
install_completed xmpp
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -675,14 +675,14 @@ function install_zeronet {
|
|||
mesh_zeronet_forum
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_zeronet" $COMPLETION_FILE; then
|
||||
if [[ $(app_is_installed zeronet) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
install_zeronet_main
|
||||
install_zeronet_blog
|
||||
install_zeronet_mail
|
||||
install_zeronet_forum
|
||||
echo 'install_zeronet' >> $COMPLETION_FILE
|
||||
install_completed zeronet
|
||||
}
|
||||
|
||||
# NOTE: deliberately no exit 0
|
||||
|
|
|
@ -71,6 +71,13 @@ function app_is_installed {
|
|||
fi
|
||||
}
|
||||
|
||||
function install_completed {
|
||||
if [ ! ${1} ]; then
|
||||
exit 673935
|
||||
fi
|
||||
echo "install_${1}" >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function get_apps_installed {
|
||||
for a in "${APPS_AVAILABLE[@]}"
|
||||
do
|
||||
|
|
Loading…
Reference in New Issue