Skip to content

Commit

Permalink
fixed abcde config locations
Browse files Browse the repository at this point in the history
  • Loading branch information
shitwolfymakes committed Jun 3, 2022
1 parent a8d5aef commit 78fd6cd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
27 changes: 16 additions & 11 deletions scripts/docker/runit/arm_user_files_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,19 @@ for dir in $SUBDIRS ; do
chown -R arm:arm "$thisDir"
done

# setup config files if not found
mkdir -p /etc/arm/config
CONFS="arm.yaml apprise.yaml .abcde.conf"
for conf in $CONFS; do
thisConf="/etc/arm/config/$conf"
if [[ ! -f "$thisConf" ]] ; then
# Don't overwrite with defaults during reinstall
cp --no-clobber "/opt/arm/setup/$conf" "$thisConf"
fi
chown -R arm:arm "$thisConf"
done
##### Setup ARM-specific config files if not found
sudo mkdir -p /etc/arm/config
CONFS="arm.yaml apprise.yaml"
for conf in $CONFS; do
thisConf="/etc/arm/config/${conf}"
if [[ ! -f "${thisConf}" ]] ; then
echo "creating config file ${thisConf}"
# Don't overwrite with defaults during reinstall
cp --no-clobber "/opt/arm/setup/${conf}" "${thisConf}"
fi
done
chown -R arm:arm /etc/arm/

# abcde.conf is expected in /etc by the abcde installation
cp --no-clobber "/opt/arm/setup/.abcde.conf" "/etc/.abcde.conf"
chown arm:arm "/etc/.abcde.conf"
8 changes: 6 additions & 2 deletions scripts/installers/ubuntu-20.04-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ function install_arm_live_env() {
}

function setup_config_files() {
##### Setup ARM config files if not found
##### Setup ARM-specific config files if not found
sudo mkdir -p /etc/arm/config
CONFS="arm.yaml apprise.yaml .abcde.conf"
CONFS="arm.yaml apprise.yaml"
for conf in $CONFS; do
thisConf="/etc/arm/config/${conf}"
if [[ ! -f "${thisConf}" ]] ; then
Expand All @@ -174,6 +174,10 @@ function setup_config_files() {
done
chown -R arm:arm /etc/arm/

# abcde.conf is expected in /etc by the abcde installation
cp --no-clobber "/opt/arm/setup/.abcde.conf" "/etc/.abcde.conf"
chown arm:arm "/etc/.abcde.conf"

if [[ $port_flag ]]; then
echo -e "${RED}Non-default port specified, updating arm config...${NC}"
# replace the default 8080 port with the specified port
Expand Down

0 comments on commit 78fd6cd

Please sign in to comment.