1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

rollback sudo

This commit is contained in:
Clément 2017-03-06 12:02:25 +01:00
parent 5da0672ef4
commit 3f293467dc
3 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,7 @@ extract_freshrss() {
# retrieve and extract FreshRSS tarball # retrieve and extract FreshRSS tarball
rc_tarball="${DESTDIR}/freshrss.tar.gz" rc_tarball="${DESTDIR}/freshrss.tar.gz"
sudo wget -q -O "$rc_tarball" "$FRESHRSS_SOURCE_URL" \ wget -q -O "$rc_tarball" "$FRESHRSS_SOURCE_URL" \
|| ynh_die "Unable to download FreshRSS tarball" || ynh_die "Unable to download FreshRSS tarball"
echo "$FRESHRSS_SOURCE_SHA256 $rc_tarball" | sha256sum -c >/dev/null \ echo "$FRESHRSS_SOURCE_SHA256 $rc_tarball" | sha256sum -c >/dev/null \
|| ynh_die "Invalid checksum of downloaded tarball" || ynh_die "Invalid checksum of downloaded tarball"

View file

@ -44,8 +44,8 @@ ynh_mysql_create_db "$db_name" "$db_user" "$db_pwd"
ynh_app_setting_set "$app" mysqlpwd "$db_pwd" ynh_app_setting_set "$app" mysqlpwd "$db_pwd"
# Copy files to the right place # Copy files to the right place
TMPDIR=$(sudo mktemp -d) TMPDIR=$(mktemp -d)
sudo chmod 655 "$TMPDIR" chmod 755 "$TMPDIR"
extract_freshrss "$TMPDIR" extract_freshrss "$TMPDIR"
$TMPDIR/cli/do-install.php --default_user $admin_user --auth_type http_auth --environment production --base_url $domain/$path --title FreshRSS --api_enabled --db-type mysql --db-host localhost --db-user $db_user --db-password $db_pwd --db-base $db_name $TMPDIR/cli/do-install.php --default_user $admin_user --auth_type http_auth --environment production --base_url $domain/$path --title FreshRSS --api_enabled --db-type mysql --db-host localhost --db-user $db_user --db-password $db_pwd --db-base $db_name

View file

@ -23,8 +23,8 @@ if [ -f $FINAL_PATH/data/user.php.dist ]; then
fi fi
# Create tmp directory and install app inside # Create tmp directory and install app inside
TMPDIR=$(sudo mktemp -d) TMPDIR=$(mktemp -d)
sudo chmod 655 "$TMPDIR" chmod 755 "$TMPDIR"
extract_freshrss "$TMPDIR" extract_freshrss "$TMPDIR"
# Restore config # Restore config