Merge branch 'v1.2'

This commit is contained in:
AJ ONeal 2017-11-07 16:01:35 -07:00
commit dc31325a0d
3 changed files with 15 additions and 16 deletions

View File

@ -1,12 +1,5 @@
# /etc/tmpfiles.d/walnut.conf # /etc/tmpfiles.d/goldilocks.conf
# See https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html # See https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
# Type Path Mode UID GID Age Argument # Type Path Mode UID GID Age Argument
#d /etc/walnut 0755 www-data www-data - - d /run/goldilocks 0755 MY_USER MY_GROUP - -
#d /etc/ssl/walnut 0750 www-data www-data - -
#d /srv/walnut 0775 www-data www-data - -
#d /srv/www 0775 www-data www-data - -
#d /opt/walnut 0775 www-data www-data - -
#d /var/walnut 0775 www-data www-data - -
#d /var/log/walnut 0750 www-data www-data - -
#d /run/walnut 0755 www-data www-data - -

View File

@ -11,6 +11,10 @@ sed "s/MY_USER/$my_user/g" "$my_app_dist/$my_app_systemd_service" > "$my_app_dis
sed "s/MY_GROUP/$my_group/g" "$my_app_dist/$my_app_systemd_service.2" > "$my_app_dist/$my_app_systemd_service" sed "s/MY_GROUP/$my_group/g" "$my_app_dist/$my_app_systemd_service.2" > "$my_app_dist/$my_app_systemd_service"
rm "$my_app_dist/$my_app_systemd_service.2" rm "$my_app_dist/$my_app_systemd_service.2"
safe_copy_config "$my_app_dist/$my_app_systemd_service" "$my_root/$my_app_systemd_service" safe_copy_config "$my_app_dist/$my_app_systemd_service" "$my_root/$my_app_systemd_service"
sed "s/MY_USER/$my_user/g" "$my_app_dist/$my_app_systemd_tmpfiles" > "$my_app_dist/$my_app_systemd_tmpfiles.2"
sed "s/MY_GROUP/$my_group/g" "$my_app_dist/$my_app_systemd_tmpfiles.2" > "$my_app_dist/$my_app_systemd_tmpfiles"
rm "$my_app_dist/$my_app_systemd_tmpfiles.2"
safe_copy_config "$my_app_dist/$my_app_systemd_tmpfiles" "$my_root/$my_app_systemd_tmpfiles" safe_copy_config "$my_app_dist/$my_app_systemd_tmpfiles" "$my_root/$my_app_systemd_tmpfiles"
$sudo_cmd systemctl stop "${my_app_name}.service" >/dev/null 2>/dev/null || true $sudo_cmd systemctl stop "${my_app_name}.service" >/dev/null 2>/dev/null || true
@ -18,6 +22,7 @@ $sudo_cmd systemctl daemon-reload
$sudo_cmd systemctl start "${my_app_name}.service" $sudo_cmd systemctl start "${my_app_name}.service"
$sudo_cmd systemctl enable "${my_app_name}.service" $sudo_cmd systemctl enable "${my_app_name}.service"
echo ""
echo "" echo ""
echo "Fun systemd commands to remember:" echo "Fun systemd commands to remember:"
echo " $sudo_cmd systemctl daemon-reload" echo " $sudo_cmd systemctl daemon-reload"
@ -25,4 +30,6 @@ echo " $sudo_cmd systemctl restart $my_app_name.service"
echo "" echo ""
echo "$my_app_name started with systemctl, check its status like so:" echo "$my_app_name started with systemctl, check its status like so:"
echo " $sudo_cmd systemctl status $my_app_name" echo " $sudo_cmd systemctl status $my_app_name"
echo " $sudo_cmd journalctl -xe -u $my_app_name" echo " $sudo_cmd journalctl -xefu $my_app_name"
echo ""
echo ""

View File

@ -7,17 +7,16 @@ set -u
### VERSION ### ### VERSION ###
my_name=walnut my_name=walnut
my_app_pkg_name=com.daplie.walnut.web my_app_pkg_name=com.daplie.walnut.web
#my_app_ver="v1.1" my_app_ver="v1.2"
my_app_ver="installer-v2"
my_azp_oauth3_ver="v1.2" my_azp_oauth3_ver="v1.2"
export NODE_VERSION="v8.9.0" export NODE_VERSION="v8.9.0"
if [ -z "${my_tmp-}" ]; then if [ -z "${my_tmp-}" ]; then
my_tmp="$(mktemp -d)" my_tmp="$(mktemp -d)"
mkdir -p $my_tmp/opt/$my_name/lib/node_modules/$my_name mkdir -p $my_tmp/opt/$my_name/core
echo "Installing to $my_tmp (will be moved after install)" echo "Installing to $my_tmp (will be moved after install)"
git clone ./ $my_tmp/opt/$my_name/lib/node_modules/$my_name git clone ./ $my_tmp/opt/$my_name/core
pushd $my_tmp/opt/$my_name/lib/node_modules/$my_name pushd $my_tmp/opt/$my_name/core
fi fi
################# #################
@ -186,7 +185,7 @@ echo " api.cloud.example.com"
echo "" echo ""
echo "Check the WALNUT README.md for more info and how to set up /etc/goldilocks/goldilocks.yml" echo "Check the WALNUT README.md for more info and how to set up /etc/goldilocks/goldilocks.yml"
echo "" echo ""
echo "Unistall: rm -rf /srv/walnut/ /var/walnut/ /etc/walnut/ /opt/walnut/ /var/log/walnut/ /etc/systemd/system/walnut.service" echo "Unistall: rm -rf /srv/walnut/ /var/walnut/ /etc/walnut/ /opt/walnut/ /var/log/walnut/ /etc/systemd/system/walnut.service /etc/tmpfiles.d/walnut.conf"