selfupdater command, add mollysocket to backup step
This commit is contained in:
parent
beb73f5f2a
commit
88fc35ac52
1 changed files with 36 additions and 1 deletions
37
helperbot
37
helperbot
|
|
@ -119,6 +119,9 @@ function info_help {
|
|||
echo "${bold}--update-certs${normal}"
|
||||
echo " Pull in various certificates from Caddy into ${underline}/etc/certs${normal} required for other services."
|
||||
echo
|
||||
echo "${bold}--update-helperbot${normal}"
|
||||
echo " Create a backup of the current helperbot into ${underline}/usr/local/bin/helperbot.bak${normal} and does an in-place upgrade of itself."
|
||||
echo
|
||||
echo "${cyan}${bold}${underline}Fediverse:${normal}"
|
||||
echo "${bold}--sync-blocklists${normal}"
|
||||
echo " Import blocklist from Sharkey -> Iceshrimp"
|
||||
|
|
@ -472,7 +475,7 @@ function system_backup {
|
|||
# configs, extra
|
||||
cp $backup_local_folder/forgejo/compose.yaml $backup_working_directory/forgejo
|
||||
# =============================================================================
|
||||
# freshrss
|
||||
# ask-js
|
||||
echo "${blue}Pulling in Ask-js...${normal}"
|
||||
mkdir -p $backup_working_directory/ask-js
|
||||
# database
|
||||
|
|
@ -481,6 +484,16 @@ function system_backup {
|
|||
cp $backup_local_folder/ask-js/compose.yaml $backup_working_directory/ask-js
|
||||
cp $backup_local_folder/ask-js/config.json $backup_working_directory/ask-js
|
||||
# =============================================================================
|
||||
# mollysocket
|
||||
echo "${blue}Pulling in MollySocket...${normal}"
|
||||
mkdir -p $backup_working_directory/mollysocket/.config
|
||||
# data - similar case to the pds, there isn't a native way to make a backup
|
||||
docker compose -f $backup_local_folder/mollysocket/compose.yaml down
|
||||
cp -r $backup_local_folder/mollysocket/data $backup_working_directory/mollysocket
|
||||
docker compose -f $backup_local_folder/mollysocket/compose.yaml up -d
|
||||
# configs, extra
|
||||
cp $backup_local_folder/mollysocket/compose.yaml $backup_working_directory/mollysocket
|
||||
# =============================================================================
|
||||
# pull in any other common configs and secrets
|
||||
echo "${blue}Pulling in other configurations...${normal}"
|
||||
mkdir -p $backup_working_directory/other/etc/caddy
|
||||
|
|
@ -598,6 +611,25 @@ function update_certificates {
|
|||
fi
|
||||
}
|
||||
|
||||
# ╭──────────────────╮
|
||||
# │ update helperbot │
|
||||
# ╰──────────────────╯
|
||||
function update_helperbot {
|
||||
local helperbot_location=/usr/local/bin/helperbot
|
||||
local helperbot_upstream_url=https://forged.synth.download/synth.download/synth.download/raw/branch/main/helperbot
|
||||
|
||||
echo "${blue}update-helperbot:${normal} Updating helperbot..."
|
||||
echo "Creating a backup into ${bold}${helperbot_location}.bak${normal}..."
|
||||
# create a backup of ourself
|
||||
cp ${helperbot_location} ${helperbot_location}.bak
|
||||
# pull in script from git
|
||||
echo "Updating..."
|
||||
wget $helperbot_upstream_url -O $helperbot_location
|
||||
chmod +x $helperbot_location
|
||||
# done
|
||||
echo "${green}Updated helperbot!${normal}"
|
||||
}
|
||||
|
||||
# ╭───────────────────╮
|
||||
# │ fediverse related │
|
||||
# ╰───────────────────╯
|
||||
|
|
@ -743,6 +775,9 @@ while [ -n "$1" ]; do
|
|||
detect_system
|
||||
fi
|
||||
update_certificates;;
|
||||
--update-helperbot) # update helperbot
|
||||
root_check
|
||||
update_helperbot;;
|
||||
--sync-blocklists) # fediverse: sync sharkey -> iceshrimp blocklists
|
||||
if [ ! -v synth_current_system ]; then
|
||||
detect_system
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue