From 7477239a5c5fdf6a672649492cbd18803e4fc495 Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Wed, 2 Jul 2014 15:33:49 +0200 Subject: [PATCH] move to new moulinette API and save patched file orig --- scripts/install | 9 ++++++++- scripts/remove | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 8342d5e..057bdaa 100644 --- a/scripts/install +++ b/scripts/install @@ -63,14 +63,21 @@ sudo rm -rf $final_path/tmp echo "Patching sources to remove calls to googleapis..." # patches to core +sudo cp $final_path/ghost/core/server/views/user-error.hbs $final_path/ghost/core/server/views/user-error.hbs.orig +sudo cp $final_path/ghost/core/server/views/default.hbs $final_path/ghost/core/server/views/default.hbs.orig +sudo cp $final_path/ghost/core/client/assets/css/fonts.css $final_path/ghost/core/client/assets/css/fonts.css.orig sudo sed -i '/googleapis/c\ ' $final_path/ghost/core/server/views/user-error.hbs sudo sed -i '/googleapis/c\ ' $final_path/ghost/core/server/views/default.hbs sudo cp ../patches/core/fonts.css $final_path/ghost/core/client/assets/css sudo cp ../patches/core/*.woff $final_path/ghost/core/client/assets/fonts # patches to casper theme +sudo cp $final_path/ghost/content/themes/casper/default.hbs $final_path/ghost/content/themes/casper/default.hbs.orig +sudo cp $final_path/ghost/content/themes/casper/assets/css/fonts.css $final_path/ghost/content/themes/casper/assets/css/fonts.css.orig sudo sed -i '/googleapis/c\ ' $final_path/ghost/content/themes/casper/default.hbs sudo cp ../patches/theme/fonts.css $final_path/ghost/content/themes/casper/assets/css sudo cp ../patches/theme/*.woff $final_path/ghost/content/themes/casper/assets/fonts + +echo "Setting up permissions" sudo chown -R ghostblog: $final_path/ghost echo "Setting up database..." @@ -100,7 +107,7 @@ sudo cp ../conf/init-script /etc/init.d/ynh-ghostblog sudo chmod +x /etc/init.d/ynh-ghostblog sudo update-rc.d ynh-ghostblog defaults sudo service ynh-ghostblog start -sudo yunohost app service ynh-ghostblog -l $logfile +sudo yunohost service add ynh-ghostblog -l $logfile echo "Setting up logrotate configuration..." sed -i "s@YNH_LOGFILE@$logfile@g" ../conf/logrotate diff --git a/scripts/remove b/scripts/remove index 46d2910..fbd3303 100644 --- a/scripts/remove +++ b/scripts/remove @@ -5,7 +5,7 @@ domain=$(sudo yunohost app setting ghostblog domain) sudo service ynh-ghostblog stop sudo update-rc.d ynh-ghostblog remove sudo rm /etc/init.d/ynh-ghostblog -sudo yunohost app service -R ynh-ghostblog +sudo yunohost service remove ynh-ghostblog sudo rm -f /etc/nginx/conf.d/$domain.d/ghostblog.conf sudo rm -f /var/log/ghostblog.log sudo rm -rf /var/run/yunohost/ghostblog