diff --git a/dev/debug_osync.sh b/dev/debug_osync.sh index 276ce1dca..565153ac0 100755 --- a/dev/debug_osync.sh +++ b/dev/debug_osync.sh @@ -90,7 +90,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi @@ -776,7 +776,7 @@ function _PerfProfiler { #__WITH_PARANOIA_DEBUG _OFUNCTIONS_SPINNER="|/-\\" function Spinner { - if [ $_LOGGER_SILENT == true ] || [ "$_LOGGER_ERR_ONLY" == true ] || [ "$_SYNC_ON_CHANGES" == "initiator" ] || [ "$_SYNC_ON_CHANGES" == "target" ] ; then + if [ "$_LOGGER_SILENT" == true ] || [ "$_LOGGER_ERR_ONLY" == true ] || [ "$_SYNC_ON_CHANGES" == "initiator" ] || [ "$_SYNC_ON_CHANGES" == "target" ] ; then return 0 else printf " [%c] \b\b\b\b\b\b" "$_OFUNCTIONS_SPINNER" @@ -2993,7 +2993,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -3434,7 +3434,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -4055,7 +4055,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -4754,7 +4754,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -5712,7 +5712,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -6049,7 +6049,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { diff --git a/install.sh b/install.sh index 546ef109f..fd8bf4723 100755 --- a/install.sh +++ b/install.sh @@ -61,7 +61,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi @@ -834,7 +834,7 @@ function CopyServiceFiles { Logger "Created [$SERVICE_NAME] service in [$SERVICE_DIR_SYSTEMD_SYSTEM] and [$SERVICE_DIR_SYSTEMD_USER]." "NOTICE" - Logger "Can be activated with [systemctl start $SERVICE_NAME@instance.conf] where instance.conf is the name of the config file in $CONF_DIR." "NOTICE" + Logger "Can be activated with [systemctl start SERVICE_NAME@instance.conf] where instance.conf is the name of the config file in $CONF_DIR." "NOTICE" Logger "Can be enabled on boot with [systemctl enable $SERVICE_NAME@instance.conf]." "NOTICE" Logger "In userland, active with [systemctl --user start $SERVICE_NAME@instance.conf]." "NOTICE" elif ([ "$init" == "initV" ] && [ -f "$SCRIPT_PATH/$SERVICE_FILE_INIT" ] && [ -d "$SERVICE_DIR_INIT" ]); then @@ -907,22 +907,13 @@ function RemoveAll { else Logger "Skipping removal of [$BIN_DIR/$SSH_FILTER] because other programs present that need it." "NOTICE" fi + RemoveFile "$SERVICE_DIR_SYSTEMD_SYSTEM/$SERVICE_FILE_SYSTEMD_SYSTEM" + RemoveFile "$SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_USER" + RemoveFile "$SERVICE_DIR_INIT/$SERVICE_FILE_INIT" - # Try to uninstall every possible service file - #if [ $init == "systemd" ]; then - RemoveFile "$SERVICE_DIR_SYSTEMD_SYSTEM/$SERVICE_FILE_SYSTEMD_SYSTEM" - RemoveFile "$SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_USER" - RemoveFile "$SERVICE_DIR_SYSTEMD_SYSTEM/$TARGET_HELPER_SERVICE_FILE_SYSTEMD_SYSTEM" - RemoveFile "$SERVICE_DIR_SYSTEMD_USER/$TARGET_HELPER_SERVICE_FILE_SYSTEMD_USER" - #elif [ $init == "initV" ]; then - RemoveFile "$SERVICE_DIR_INIT/$SERVICE_FILE_INIT" - RemoveFile "$SERVICE_DIR_INIT/$TARGET_HELPER_SERVICE_FILE_INIT" - #elif [ $init == "openrc" ]; then - RemoveFile "$SERVICE_DIR_OPENRC/$SERVICE_FILE_OPENRC" - RemoveFile "$SERVICE_DIR_OPENRC/$TARGET_HELPER_SERVICE_FILE_OPENRC" - #else - #Logger "Can't uninstall from initV, systemd or openRC." "WARN" - #fi + RemoveFile "$TARGET_HELPER_SERVICE_DIR_SYSTEMD_SYSTEM/$SERVICE_FILE_SYSTEMD_SYSTEM" + RemoveFile "$TARGET_HELPER_SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_USER" + RemoveFile "$TARGET_HELPER_SERVICE_DIR_INIT/$SERVICE_FILE_INIT" Logger "Skipping configuration files in [$CONF_DIR]. You may remove this directory manually." "NOTICE" } @@ -930,8 +921,8 @@ function RemoveAll { function Usage { echo "Installs $PROGRAM into $BIN_DIR" echo "options:" - echo "--silent Will log and bypass user interaction." - echo "--no-stats Used with --silent in order to refuse sending anonymous install stats." + echo "--silent Will log and bypass user interaction." + echo "--no-stats Used with --silent in order to refuse sending anonymous install stats." echo "--remove Remove the program." echo "--prefix=/path Use prefix to install path." exit 127 diff --git a/osync.sh b/osync.sh index ff0c0f8cd..92741a023 100755 --- a/osync.sh +++ b/osync.sh @@ -57,7 +57,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi @@ -458,7 +458,7 @@ function SendAlert { fi if [ $runAlert == true ]; then - subject="Currently runing - $subject" + subject="Currently running - $subject" else subject="Finished run - $subject" fi @@ -712,7 +712,7 @@ function LoadConfigFile { _OFUNCTIONS_SPINNER="|/-\\" function Spinner { - if [ $_LOGGER_SILENT == true ] || [ "$_LOGGER_ERR_ONLY" == true ] || [ "$_SYNC_ON_CHANGES" == "initiator" ] || [ "$_SYNC_ON_CHANGES" == "target" ] ; then + if [ "$_LOGGER_SILENT" == true ] || [ "$_LOGGER_ERR_ONLY" == true ] || [ "$_SYNC_ON_CHANGES" == "initiator" ] || [ "$_SYNC_ON_CHANGES" == "target" ] ; then return 0 else printf " [%c] \b\b\b\b\b\b" "$_OFUNCTIONS_SPINNER" @@ -2834,7 +2834,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -3263,7 +3263,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -3867,7 +3867,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -4551,7 +4551,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -5495,7 +5495,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError { @@ -5820,7 +5820,7 @@ else _LOGGER_VERBOSE=true fi -if [ "$SLEEP_TIME" == "" ]; then # Leave the possibity to set SLEEP_TIME as environment variable when runinng with bash -x in order to avoid spamming console +if [ "$SLEEP_TIME" == "" ]; then # Leave the possibility to set SLEEP_TIME as environment variable when running with bash -x in order to avoid spamming console SLEEP_TIME=.05 fi function TrapError {