From 6a0ccd17740110b9d4700566c3a9e29c7c08d3dd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 Jul 2016 11:02:31 +0100 Subject: [PATCH] Missing username --- src/freedombone-image-customise | 2 +- src/freedombone-image-mesh | 52 ++++++++++++++++----------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 8eda1de8..7b0b1571 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -545,7 +545,7 @@ initialise_mesh() { echo 'User=root' >> $MESH_SETUP_DAEMON echo 'Group=root' >> $MESH_SETUP_DAEMON echo 'WorkingDirectory=/root' >> $MESH_SETUP_DAEMON - echo "ExecStart=/usr/local/bin/${PROJECT_NAME}-image-mesh > /var/log/mesh-setup.log" >> $MESH_SETUP_DAEMON + echo "ExecStart=/usr/local/bin/${PROJECT_NAME}-image-mesh ${MY_USERNAME} > /var/log/mesh-setup.log" >> $MESH_SETUP_DAEMON echo '' >> $MESH_SETUP_DAEMON echo 'TimeoutSec=99999' >> $MESH_SETUP_DAEMON echo '' >> $MESH_SETUP_DAEMON diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index 39fafcd2..c4c56edf 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -152,14 +152,14 @@ function configure_zeronet_blog { echo '' >> /tmp/zeronet-blog.service cp /tmp/zeronet-blog.service /etc/avahi/services/zeronet-blog.service - if [ ! -d /home/$MY_USERNAME/.config/zeronet ]; then - mkdir -p /home/$MY_USERNAME/.config/zeronet - chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config + if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then + mkdir -p /home/${MY_USERNAME}/.config/zeronet + chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config fi - echo "$ZERONET_URL/$ZERONET_BLOG_ADDRESS" > /home/$MY_USERNAME/.config/zeronet/myblog + echo "$ZERONET_URL/$ZERONET_BLOG_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/myblog - sed -i "s|ZeroNet Blog address.*|ZeroNet Blog address: $ZERONET_BLOG_ADDRESS|g" /home/$MY_USERNAME/README - sed -i "s|ZeroNet Blog private key.*|ZeroNet Blog private key: $ZERONET_BLOG_PRIVATE_KEY|g" /home/$MY_USERNAME/README + sed -i "s|ZeroNet Blog address.*|ZeroNet Blog address: $ZERONET_BLOG_ADDRESS|g" /home/${MY_USERNAME}/README + sed -i "s|ZeroNet Blog private key.*|ZeroNet Blog private key: $ZERONET_BLOG_PRIVATE_KEY|g" /home/${MY_USERNAME}/README echo $'Update of ZeroNet Blog completed' >> $INSTALL_LOG } @@ -226,14 +226,14 @@ function configure_zeronet_mail { echo '' >> /tmp/zeronet-mail.service cp /tmp/zeronet-mail.service /etc/avahi/services/zeronet-mail.service - if [ ! -d /home/$MY_USERNAME/.config/zeronet ]; then - mkdir -p /home/$MY_USERNAME/.config/zeronet - chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config + if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then + mkdir -p /home/${MY_USERNAME}/.config/zeronet + chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config fi - echo "$ZERONET_URL/$ZERONET_MAIL_ADDRESS" > /home/$MY_USERNAME/.config/zeronet/mymail + echo "$ZERONET_URL/$ZERONET_MAIL_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/mymail - sed -i "s|ZeroNet Mail address.*|ZeroNet Mail address: $ZERONET_MAIL_ADDRESS|g" /home/$MY_USERNAME/README - sed -i "s|ZeroNet Mail private key.*|ZeroNet Mail private key: $ZERONET_MAIL_PRIVATE_KEY|g" /home/$MY_USERNAME/README + sed -i "s|ZeroNet Mail address.*|ZeroNet Mail address: $ZERONET_MAIL_ADDRESS|g" /home/${MY_USERNAME}/README + sed -i "s|ZeroNet Mail private key.*|ZeroNet Mail private key: $ZERONET_MAIL_PRIVATE_KEY|g" /home/${MY_USERNAME}/README echo $'Update of ZeroNet Mail completed' >> $INSTALL_LOG } @@ -295,14 +295,14 @@ function configure_zeronet_forum { echo '' >> /tmp/zeronet-forum.service sudo cp /tmp/zeronet-forum.service /etc/avahi/services/zeronet-forum.service - if [ ! -d /home/$MY_USERNAME/.config/zeronet ]; then - mkdir -p /home/$MY_USERNAME/.config/zeronet - chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config + if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then + mkdir -p /home/${MY_USERNAME}/.config/zeronet + chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config fi - echo "$ZERONET_URL/$ZERONET_FORUM_ADDRESS" > /home/$MY_USERNAME/.config/zeronet/myforum + echo "$ZERONET_URL/$ZERONET_FORUM_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/myforum - sed -i "s|ZeroNet Forum address.*|ZeroNet Forum address: $ZERONET_FORUM_ADDRESS|g" /home/$MY_USERNAME/README - sed -i "s|ZeroNet Forum private key.*|ZeroNet Forum private key: $ZERONET_FORUM_PRIVATE_KEY|g" /home/$MY_USERNAME/README + sed -i "s|ZeroNet Forum address.*|ZeroNet Forum address: $ZERONET_FORUM_ADDRESS|g" /home/${MY_USERNAME}/README + sed -i "s|ZeroNet Forum private key.*|ZeroNet Forum private key: $ZERONET_FORUM_PRIVATE_KEY|g" /home/${MY_USERNAME}/README echo $'Update of ZeroNet Forum completed' >> $INSTALL_LOG } @@ -360,14 +360,14 @@ function configure_zeronet_id { echo '' >> /tmp/zeronet-id.service sudo cp /tmp/zeronet-id.service /etc/avahi/services/zeronet-id.service - if [ ! -d /home/$MY_USERNAME/.config/zeronet ]; then - mkdir -p /home/$MY_USERNAME/.config/zeronet - chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config + if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then + mkdir -p /home/${MY_USERNAME}/.config/zeronet + chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config fi - echo "$ZERONET_URL/$ZERONET_ID_ADDRESS" > /home/$MY_USERNAME/.config/zeronet/myzeroid + echo "$ZERONET_URL/$ZERONET_ID_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/myzeroid - sed -i "s|ZeroID address.*|ZeroID address: $ZERONET_ID_ADDRESS|g" /home/$MY_USERNAME/README - sed -i "s|ZeroID private key.*|ZeroID private key: $ZERONET_ID_PRIVATE_KEY|g" /home/$MY_USERNAME/README + sed -i "s|ZeroID address.*|ZeroID address: $ZERONET_ID_ADDRESS|g" /home/${MY_USERNAME}/README + sed -i "s|ZeroID private key.*|ZeroID private key: $ZERONET_ID_PRIVATE_KEY|g" /home/${MY_USERNAME}/README echo $'Update of ZeroID completed' >> $INSTALL_LOG } @@ -399,8 +399,8 @@ function configure_toxcore { echo $'Configured toxcore' >> $INSTALL_LOG echo $'Clearing toxic client settings' >> $INSTALL_LOG - if [ -d /home/$MY_USERNAME/.config/tox ]; then - rm -rf /home/$MY_USERNAME/.config/tox + if [ -d /home/${MY_USERNAME}/.config/tox ]; then + rm -rf /home/${MY_USERNAME}/.config/tox fi echo $'toxic client configured' >> $INSTALL_LOG }